Exception: BSON::Binary::InvalidType
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- BSON::Binary::InvalidType
- Defined in:
- lib/bson/binary.rb
Overview
Raised when providing an invalid type to the Binary.
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(type) ⇒ InvalidType
constructor
Instantiate the new error.
-
#message ⇒ String
Get the custom error message for the exception.
Constructor Details
#initialize(type) ⇒ InvalidType
Instantiate the new error.
176 177 178 |
# File 'lib/bson/binary.rb', line 176 def initialize(type) @type = type end |
Instance Attribute Details
Instance Method Details
#message ⇒ String
Get the custom error message for the exception.
188 189 190 191 |
# File 'lib/bson/binary.rb', line 188 def "#{type.inspect} is not a valid binary type. " + "Please use one of #{SUBTYPES.keys.map(&:inspect).join(", ")}." end |