Exception: JadeSerializationException

Inherits:
StandardError
  • Object
show all
Defined in:
jade/jade_exceptions.rb

Overview

A specialised Jade Exception of type JadeSerializationException. This is used when trying to serialize a JadeObject to string or file and an error occurs.

Author:

  • Joseph Beck

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeNilClass

Overloads the original initialize method of standard error. Initializes the superclass using the message from the parameter. This helps to provide a more specific exception type.

Parameters:

  • (String, String)


84
85
86
87
# File 'jade/jade_exceptions.rb', line 84

def initialize(msg = 'Failed to convert JadeObject to other Object', exception_type = 'JadeSerializationException')
  @exception_type = exception_type
  super(msg)
end

Instance Attribute Details

#:exception_type(: exception_type) ⇒ Object

The exception type may require use outside of the instance of itself and therefore has an attribute accessor.



74
# File 'jade/jade_exceptions.rb', line 74

attr_accessor :exception_type

#exception_typeObject

The exception type may require use outside of the instance of itself and therefore has an attribute accessor.



74
75
76
# File 'jade/jade_exceptions.rb', line 74

def exception_type
  @exception_type
end