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.
187 188 189 190 191 192 193 194 195 196 |
# File 'lib/rocketamf/values/messages.rb', line 187 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
172 173 174 |
# File 'lib/rocketamf/values/messages.rb', line 172 def extendedData @extendedData end |
#faultCode ⇒ Object
The fault code for the error, which defaults to the class name of the causing exception
176 177 178 |
# File 'lib/rocketamf/values/messages.rb', line 176 def faultCode @faultCode end |
#faultDetail ⇒ Object
Detailed description of what caused the error
179 180 181 |
# File 'lib/rocketamf/values/messages.rb', line 179 def faultDetail @faultDetail end |
#faultString ⇒ Object
A simple description of the error
182 183 184 |
# File 'lib/rocketamf/values/messages.rb', line 182 def faultString @faultString end |
#rootCause ⇒ Object
Optional “root cause” of the error
185 186 187 |
# File 'lib/rocketamf/values/messages.rb', line 185 def rootCause @rootCause end |
Instance Method Details
#encode_amf(serializer) ⇒ Object
198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/rocketamf/values/messages.rb', line 198 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 |