Sha256: 60c011bc93caa06a4f9c17c5c967b6abe500adca350031be22c8b0fb2f3784d7

Contents?: true

Size: 401 Bytes

Versions: 40

Compression:

Stored size: 401 Bytes

Contents

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

40 entries across 40 versions & 1 rubygems

Version Path
utopia-2.11.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.11.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.10.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.9.5 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.9.3 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.9.2 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.9.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.9.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.8.2 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.8.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.8.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.7.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.6.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.5.5 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.5.4 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.5.3 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.5.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.5.0 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.4.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-2.4.0 spec/utopia/exceptions/handler_spec/controller.rb