Exception: Couchbase::Error::InvalidArgument
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Couchbase::Error::InvalidArgument
- Defined in:
- lib/couchbase/errors.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/errors.rb more...
Instance Attribute Summary collapse
-
#context ⇒ Hash
readonly
Attributes associated with the error.
Instance Method Summary collapse
-
#initialize(msg = nil, context = nil) ⇒ InvalidArgument
constructor
A new instance of InvalidArgument.
- #to_s ⇒ Object
Constructor Details
#initialize(msg = nil, context = nil) ⇒ InvalidArgument
Returns a new instance of InvalidArgument.
38 39 40 41 |
# File 'lib/couchbase/errors.rb', line 38 def initialize(msg = nil, context = nil) @context = context unless context.nil? super(msg) end |
Instance Attribute Details
#context ⇒ Hash (readonly)
Returns attributes associated with the error.
36 37 38 |
# File 'lib/couchbase/errors.rb', line 36 def context @context end |
Instance Method Details
#to_s ⇒ Object
[View source]
43 44 45 |
# File 'lib/couchbase/errors.rb', line 43 def to_s defined?(@context) ? "#{super}, context=#{JSON.generate(@context)}" : super end |