Module: Mongo::Error::Notable Private
- Included in:
- Mongo::Error, AuthError
- Defined in:
- lib/mongo/error/notable.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
A module encapsulating note tracking functionality, since currently the driver does not have a single exception hierarchy root.
Instance Method Summary collapse
- #add_note(note) ⇒ Object private
-
#notes ⇒ Array<String>
Returns an array of strings with additional information about the exception.
- #to_s ⇒ Object
Instance Method Details
#add_note(note) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
41 42 43 44 45 46 |
# File 'lib/mongo/error/notable.rb', line 41 def add_note(note) unless @notes @notes = [] end @notes << note end |
#notes ⇒ Array<String>
Returns an array of strings with additional information about the exception.
32 33 34 35 36 37 38 |
# File 'lib/mongo/error/notable.rb', line 32 def notes if @notes @notes.dup else [] end end |
#to_s ⇒ Object
49 50 51 |
# File 'lib/mongo/error/notable.rb', line 49 def to_s super + notes_tail end |