Exception: BSON::Error::InvalidDecimal128Argument

Inherits:
BSON::Error
  • Object
show all
Defined in:
lib/bson/error/invalid_decimal128_argument.rb

Overview

Raised when trying to create a Decimal128 from an object that is neither a String nor a BigDecimal.

Constant Summary collapse

MESSAGE =

The custom error message for this error.

'A Decimal128 can only be created from a String or BigDecimal.'

Instance Method Summary collapse

Instance Method Details

#messageString

Get the custom error message for the exception.

Examples:

Get the message.

error.message

Returns:

  • (String)

    The error message.



19
20
21
# File 'lib/bson/error/invalid_decimal128_argument.rb', line 19

def message
  MESSAGE
end