Class: AMF::Messages::ErrorMessage
- Inherits:
-
AcknowledgeMessage
- Object
- AbstractMessage
- AsyncMessage
- AcknowledgeMessage
- AMF::Messages::ErrorMessage
- Defined in:
- lib/amf/messages.rb
Overview
Maps to flex.messaging.messages.ErrorMessage in AMF3 mode
Instance Attribute Summary collapse
-
#extended_data ⇒ Object
Extended data that will facilitate custom error processing on the client.
-
#fault_code ⇒ Object
The fault code for the error, which defaults to the class name of the causing exception.
-
#fault_detail ⇒ Object
Detailed description of what caused the error.
-
#fault_string ⇒ Object
A simple description of the error.
-
#root_cause ⇒ Object
Optional “root cause” of the error.
Attributes inherited from AsyncMessage
Attributes inherited from AbstractMessage
#body, #client_id, #headers, #message_id, #time_to_live, #timestamp
Instance Method Summary collapse
-
#initialize(message, exception) ⇒ ErrorMessage
constructor
A new instance of ErrorMessage.
- #to_amf(serializer) ⇒ Object
Constructor Details
#initialize(message, exception) ⇒ ErrorMessage
Returns a new instance of ErrorMessage.
117 118 119 120 121 122 123 124 |
# File 'lib/amf/messages.rb', line 117 def initialize , exception super @e = exception @fault_code = @e.class.name @fault_detail = @e.backtrace.join("\n") @fault_string = @e. end |
Instance Attribute Details
#extended_data ⇒ Object
Extended data that will facilitate custom error processing on the client
102 103 104 |
# File 'lib/amf/messages.rb', line 102 def extended_data @extended_data end |
#fault_code ⇒ Object
The fault code for the error, which defaults to the class name of the causing exception
106 107 108 |
# File 'lib/amf/messages.rb', line 106 def fault_code @fault_code end |
#fault_detail ⇒ Object
Detailed description of what caused the error
109 110 111 |
# File 'lib/amf/messages.rb', line 109 def fault_detail @fault_detail end |
#fault_string ⇒ Object
A simple description of the error
112 113 114 |
# File 'lib/amf/messages.rb', line 112 def fault_string @fault_string end |
#root_cause ⇒ Object
Optional “root cause” of the error
115 116 117 |
# File 'lib/amf/messages.rb', line 115 def root_cause @root_cause end |
Instance Method Details
#to_amf(serializer) ⇒ Object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/amf/messages.rb', line 126 def to_amf serializer stream = "" # if serializer.version == 0 # data = { # :faultCode => @faultCode, # :faultDetail => @faultDetail, # :faultString => @faultString # } # serializer.write_hash(data, stream) # else # serializer.write_object(self, stream) # end stream end |