Sha256: 1f70f8ff7ecc6563cbf2c499553d789dc7f44000e4d3c182d3805e0ee1333a3c

Contents?: true

Size: 431 Bytes

Versions: 13

Compression:

Stored size: 431 Bytes

Contents

# frozen_string_literal: true

prepend Actions

class TharSheBlows < StandardError
end

on 'blow' do
	raise TharSheBlows.new("Arrrh!")
end

# The ExceptionHandler middleware will redirect here when an exception occurs. If this also fails, things get ugly.
on 'exception' do |request|
	if request.params['fatal']
		raise TharSheBlows.new("Yarrh!")
	else
		succeed! :content => 'Error Will Robertson', :type => 'text/plain'
	end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
utopia-2.15.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.15.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.14.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.13.4 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.13.3 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.13.2 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.13.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.13.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.12.4 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.12.3 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.12.2 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.12.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.12.0 spec/utopia/exceptions/handler_spec/controller.rb