Exception: PacketConversionException
- Inherits:
-
StandardError
- Object
- StandardError
- PacketConversionException
- Defined in:
- client/packet_exceptions.rb
Overview
The Packet Conversion Exception inherits from the StandardError. It is used when an error occurs converting from an object of type Packet to something else.
Instance Attribute Summary collapse
-
#:exception_type(: exception_type) ⇒ Object
The exception type may require use outside of the instance of itself and therefore has an attribute accessor.
-
#exception_type ⇒ Object
The exception type may require use outside of the instance of itself and therefore has an attribute accessor.
Instance Method Summary collapse
-
#initialize(msg = 'Failed to convert Packet to other Object', exception_type = 'PacketConversionException') ⇒ NilClass
constructor
The constructor of this class takes in a msg and defaults just like the exception type.
Constructor Details
#initialize(msg = 'Failed to convert Packet to other Object', exception_type = 'PacketConversionException') ⇒ NilClass
The constructor of this class takes in a msg and defaults just like the exception type. This then calls the superclass’ constructor with.
24 25 26 27 |
# File 'client/packet_exceptions.rb', line 24 def initialize(msg = 'Failed to convert Packet to other Object', exception_type = 'PacketConversionException') @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.
16 |
# File 'client/packet_exceptions.rb', line 16 attr_accessor :exception_type |
#exception_type ⇒ Object
The exception type may require use outside of the instance of itself and therefore has an attribute accessor.
16 17 18 |
# File 'client/packet_exceptions.rb', line 16 def exception_type @exception_type end |