Exception: Apimaster::NormalError
- Inherits:
-
StandardError
- Object
- StandardError
- Apimaster::NormalError
- Defined in:
- lib/apimaster/error.rb
Direct Known Subclasses
AlreadyExistsError, InvalidFieldError, MissingError, MissingFieldError, OauthError, PermissionDeniedError, RelationExistsError, RequestError, UnauthorizedError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#resource ⇒ Object
readonly
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(message = '', code = nil, error = :invalid, resource = nil, field = nil) ⇒ NormalError
constructor
error :missing, :missing_field, :invalid, :already_exists.
Constructor Details
#initialize(message = '', code = nil, error = :invalid, resource = nil, field = nil) ⇒ NormalError
error :missing, :missing_field, :invalid, :already_exists
16 17 18 19 20 21 22 |
# File 'lib/apimaster/error.rb', line 16 def initialize( = '', code = nil, error = :invalid, resource = nil, field = nil) @code = code @error = error.to_sym @resource = resource @field = field super() end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
10 11 12 |
# File 'lib/apimaster/error.rb', line 10 def code @code end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
11 12 13 |
# File 'lib/apimaster/error.rb', line 11 def error @error end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
13 14 15 |
# File 'lib/apimaster/error.rb', line 13 def field @field end |
#resource ⇒ Object (readonly)
Returns the value of attribute resource.
12 13 14 |
# File 'lib/apimaster/error.rb', line 12 def resource @resource end |