class Evercam::EvercamError
This is the base error class for exceptions generated within the Evercam
library.
Attributes
context[R]
status[R]
Public Class Methods
new(message, code=nil, status=nil, *context)
click to toggle source
Constructor for the EvercamError
class.
Parameters¶ ↑
- message
-
A String containing the error message for the exception.
- code
-
The error code associated with the exception if one is available. Defaults to nil.
- status
-
The HTTP status code associated with the exception if one is available. Defaults to nil.
- *context
-
A collection of contextual data associated with the exception.
Calls superclass method
# File lib/evercam/exceptions.rb, line 17 def initialize(message, code=nil, status=nil, *context) super(message) @code = code @status = status @context = context end
Public Instance Methods
code()
click to toggle source
# File lib/evercam/exceptions.rb, line 26 def code (@code || "unknown_error") end