Exception: OMF::SFA::AM::Rest::RackException
- Inherits:
-
Exception
- Object
- Exception
- OMF::SFA::AM::Rest::RackException
- Defined in:
- lib/omf-sfa/am/am-rest/rest_handler.rb
Direct Known Subclasses
BadRequestException, EmptyBodyException, IllegalMethodException, MissingResourceException, NotAuthorizedException, UnknownResourceException, UnsupportedBodyFormatException, UnsupportedMethodException
Instance Attribute Summary collapse
-
#reply ⇒ Object
readonly
Returns the value of attribute reply.
Instance Method Summary collapse
-
#initialize(err_code, reason) ⇒ RackException
constructor
A new instance of RackException.
Constructor Details
#initialize(err_code, reason) ⇒ RackException
Returns a new instance of RackException.
17 18 19 20 21 22 23 24 |
# File 'lib/omf-sfa/am/am-rest/rest_handler.rb', line 17 def initialize(err_code, reason) super reason body = {:exception => { :code => err_code, :reason => reason }} @reply = [err_code, {"Content-Type" => 'text/json'}, body.to_json] end |
Instance Attribute Details
#reply ⇒ Object (readonly)
Returns the value of attribute reply.
15 16 17 |
# File 'lib/omf-sfa/am/am-rest/rest_handler.rb', line 15 def reply @reply end |