Exception: CF::CFError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cf.rb

Overview

FIX: raise the exception along with the response error message Ref: http://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.message}"
debugger
puts ""
end

end

class ClientError < StandardError; end class ServerError < CFError; end class General < CFError; end

Direct Known Subclasses

ImproveStationNotAllowed