Exception: MaxBotApi::SerializationError

Inherits:
Error
  • Object
show all
Defined in:
lib/max_bot_api/errors.rb

Overview

Raised when serialization or parsing fails.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op:, type:, original_error:) ⇒ SerializationError

Returns a new instance of SerializationError.

Parameters:

  • op (String)

    operation name

  • type (String)

    serialized object type

  • original_error (Exception)

    original error



88
89
90
91
92
93
# File 'lib/max_bot_api/errors.rb', line 88

def initialize(op:, type:, original_error:)
  @op = op
  @type = type
  @original_error = original_error
  super("serialization error during #{op} of #{type}: #{original_error}")
end

Instance Attribute Details

#opObject (readonly)

Returns the value of attribute op.



83
84
85
# File 'lib/max_bot_api/errors.rb', line 83

def op
  @op
end

#original_errorObject (readonly)

Returns the value of attribute original_error.



83
84
85
# File 'lib/max_bot_api/errors.rb', line 83

def original_error
  @original_error
end

#typeObject (readonly)

Returns the value of attribute type.



83
84
85
# File 'lib/max_bot_api/errors.rb', line 83

def type
  @type
end