Class: Flatware::SerializedException
- Inherits:
-
Object
- Object
- Flatware::SerializedException
- Defined in:
- lib/flatware/serialized_exception.rb
Instance Attribute Summary collapse
-
#backtrace ⇒ Object
Returns the value of attribute backtrace.
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#class ⇒ Object
readonly
Returns the value of attribute class.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(klass, message, backtrace, cause = '') ⇒ SerializedException
constructor
A new instance of SerializedException.
Constructor Details
#initialize(klass, message, backtrace, cause = '') ⇒ SerializedException
Returns a new instance of SerializedException.
5 6 7 |
# File 'lib/flatware/serialized_exception.rb', line 5 def initialize(klass, , backtrace, cause='') @class, , @backtrace, @cause = serialized(klass), , backtrace, cause end |
Instance Attribute Details
#backtrace ⇒ Object
Returns the value of attribute backtrace.
4 5 6 |
# File 'lib/flatware/serialized_exception.rb', line 4 def backtrace @backtrace end |
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
3 4 5 |
# File 'lib/flatware/serialized_exception.rb', line 3 def cause @cause end |
#class ⇒ Object (readonly)
Returns the value of attribute class.
3 4 5 |
# File 'lib/flatware/serialized_exception.rb', line 3 def class @class end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/flatware/serialized_exception.rb', line 3 def end |
Class Method Details
.from(exception) ⇒ Object
9 10 11 |
# File 'lib/flatware/serialized_exception.rb', line 9 def self.from(exception) new exception.class, exception., exception.backtrace, exception.cause end |