Class: RocketAMF::Values::ErrorMessage
- Inherits:
-
AcknowledgeMessage
- Object
- AbstractMessage
- AsyncMessage
- AcknowledgeMessage
- RocketAMF::Values::ErrorMessage
- Defined in:
- lib/rocketamf/values/messages.rb
Overview
Maps to flex.messaging.messages.ErrorMessage
in AMF3 mode
Constant Summary
Constants inherited from AcknowledgeMessage
AcknowledgeMessage::EXTERNALIZABLE_FIELDS
Constants inherited from AsyncMessage
AsyncMessage::EXTERNALIZABLE_FIELDS
Constants inherited from AbstractMessage
AbstractMessage::EXTERNALIZABLE_FIELDS
Instance Attribute Summary collapse
-
#extendedData ⇒ Object
Extended data that will facilitate custom error processing on the client.
-
#faultCode ⇒ Object
The fault code for the error, which defaults to the class name of the causing exception.
-
#faultDetail ⇒ Object
Detailed description of what caused the error.
-
#faultString ⇒ Object
A simple description of the error.
-
#rootCause ⇒ Object
Optional “root cause” of the error.
Attributes inherited from AsyncMessage
Attributes inherited from AbstractMessage
#body, #clientId, #destination, #headers, #messageId, #timeToLive, #timestamp
Instance Method Summary collapse
- #encode_amf(serializer) ⇒ Object
-
#initialize(message = nil, exception = nil) ⇒ ErrorMessage
constructor
A new instance of ErrorMessage.
Methods inherited from AcknowledgeMessage
Methods inherited from AsyncMessage
#correlationIdBytes=, #read_external
Methods inherited from AbstractMessage
#clientIdBytes=, #messageIdBytes=, #read_external
Constructor Details
#initialize(message = nil, exception = nil) ⇒ ErrorMessage
Returns a new instance of ErrorMessage.
189 190 191 192 193 194 195 196 197 198 |
# File 'lib/rocketamf/values/messages.rb', line 189 def initialize =nil, exception=nil super unless exception.nil? @e = exception @faultCode = @e.class.name @faultDetail = @e.backtrace.join("\n") @faultString = @e. end end |
Instance Attribute Details
#extendedData ⇒ Object
Extended data that will facilitate custom error processing on the client
174 175 176 |
# File 'lib/rocketamf/values/messages.rb', line 174 def extendedData @extendedData end |
#faultCode ⇒ Object
The fault code for the error, which defaults to the class name of the causing exception
178 179 180 |
# File 'lib/rocketamf/values/messages.rb', line 178 def faultCode @faultCode end |
#faultDetail ⇒ Object
Detailed description of what caused the error
181 182 183 |
# File 'lib/rocketamf/values/messages.rb', line 181 def faultDetail @faultDetail end |
#faultString ⇒ Object
A simple description of the error
184 185 186 |
# File 'lib/rocketamf/values/messages.rb', line 184 def faultString @faultString end |
#rootCause ⇒ Object
Optional “root cause” of the error
187 188 189 |
# File 'lib/rocketamf/values/messages.rb', line 187 def rootCause @rootCause end |
Instance Method Details
#encode_amf(serializer) ⇒ Object
200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/rocketamf/values/messages.rb', line 200 def encode_amf serializer if serializer.version == 0 data = { :faultCode => @faultCode, :faultDetail => @faultDetail, :faultString => @faultString } serializer.write_object(data) else serializer.write_object(self) end end |