Exception: CF::CFError
- Inherits:
-
StandardError
- Object
- StandardError
- CF::CFError
- Defined in:
- lib/cf.rb
Overview
FIX: raise the exception along with the response error message Ref: www.simonecarletti.com/blog/2009/12/inside-ruby-on-rails-rescuable-and-rescue_from/ class CFError < StandardError
include ActiveSupport::Rescuable
attr_reader :data
rescue_from NotFound, :with => :render_error
def initialize(data)
@data = data
# debugger
super
end
def to_s
"Error: #{@data}"
end
def render_error(exception)
@error = exception
"Error: #{exception.class}: #{exception.}"
debugger
puts ""
end
end
class ClientError < StandardError; end class ServerError < CFError; end class General < CFError; end