Exception: Couchbase::Error::CouchbaseError
- Inherits:
-
StandardError
- Object
- StandardError
- Couchbase::Error::CouchbaseError
- Defined in:
- lib/couchbase/errors.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/errors.rb more...
Direct Known Subclasses
AuthenticationFailure, BackendError, BucketExists, BucketNotFlushable, BucketNotFound, CasMismatch, ClusterClosed, CollectionExists, CollectionNotFound, CompilationFailure, ConsistencyMismatch, DatasetExists, DatasetNotFound, DataverseExists, DataverseNotFound, DecodingFailure, DeltaInvalid, DesignDocumentNotFound, DocumentExists, DocumentIrretrievable, DocumentLocked, DocumentNotFound, DocumentNotJson, DurabilityAmbiguous, DurabilityImpossible, DurabilityLevelNotAvailable, DurableWriteInProgress, DurableWriteReCommitInProgress, EncodingFailure, FeatureNotAvailable, GroupNotFound, IndexExists, IndexFailure, IndexNotFound, IndexNotReady, InternalServerFailure, JobQueueFull, LinkExists, LinkNotFound, NoEnvironment, NumberTooBig, ParsingFailure, PathExists, PathInvalid, PathMismatch, PathNotFound, PathTooBig, PathTooDeep, PlanningFailure, PreparedStatementFailure, RequestCanceled, ScopeExists, ScopeNotFound, ServiceNotAvailable, TemporaryFailure, Timeout, UnsupportedOperation, UserExists, UserNotFound, ValueInvalid, ValueTooDeep, ValueTooLarge, ViewNotFound, XattrCannotModifyVirtualAttribute, XattrInvalidKeyCombo, XattrUnknownMacro, XattrUnknownVirtualAttribute
Instance Attribute Summary collapse
-
#context ⇒ Hash
readonly
Attributes associated with the error.
Instance Method Summary collapse
-
#initialize(msg = nil, context = nil) ⇒ CouchbaseError
constructor
A new instance of CouchbaseError.
- #to_s ⇒ Object
Constructor Details
#initialize(msg = nil, context = nil) ⇒ CouchbaseError
Returns a new instance of CouchbaseError.
24 25 26 27 |
# File 'lib/couchbase/errors.rb', line 24 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.
22 23 24 |
# File 'lib/couchbase/errors.rb', line 22 def context @context end |
Instance Method Details
#to_s ⇒ Object
[View source]
29 30 31 |
# File 'lib/couchbase/errors.rb', line 29 def to_s defined?(@context) ? "#{super}, context=#{JSON.generate(@context)}" : super end |