Sha256: 19af300e7473c4455e9e55f4465ca22494d62c30c62576b52e010ecbc896c5e0

Contents?: true

Size: 384 Bytes

Versions: 4

Compression:

Stored size: 384 Bytes

Contents

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

4 entries across 4 versions & 1 rubygems

Version Path
utopia-1.8.3 spec/utopia/exceptions/handler_spec/controller.rb
utopia-1.8.2 spec/utopia/exceptions/handler_spec/controller.rb
utopia-1.8.1 spec/utopia/exceptions/handler_spec/controller.rb
utopia-1.8.0 spec/utopia/exceptions/handler_spec/controller.rb