Exception: Lce::Client::Errors::LceError
- Inherits:
-
StandardError
- Object
- StandardError
- Lce::Client::Errors::LceError
- Defined in:
- lib/lce/client/errors.rb
Direct Known Subclasses
AccessDenied, AccountDisabled, ConnectionError, VersionError
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(msg, type, details) ⇒ LceError
constructor
A new instance of LceError.
- #to_s ⇒ Object
Constructor Details
#initialize(msg, type, details) ⇒ LceError
Returns a new instance of LceError.
6 7 8 9 10 |
# File 'lib/lce/client/errors.rb', line 6 def initialize(msg, type, details) super(msg) @type = type @details = details end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
5 6 7 |
# File 'lib/lce/client/errors.rb', line 5 def details @details end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/lce/client/errors.rb', line 5 def type @type end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 16 |
# File 'lib/lce/client/errors.rb', line 11 def to_s s = super d = (@details.is_a? Array)? @details.join(' ') : @details s+= "\n#{d}" if d && !d.empty? s end |