lib/rocketamf/remoting.rb in RocketAMF-0.0.5 vs lib/rocketamf/remoting.rb in RocketAMF-0.0.6
- old
+ new
@@ -8,11 +8,11 @@
@headers = []
@messages = []
end
# Populates the request from the given stream or string. Returns self for easy
- # chaining
+ # chaining.
#
# Example:
#
# req = RocketAMF::Request.new.populate_from_stream(env['rack.input'].read)
#--
@@ -31,11 +31,11 @@
@amf_version = 0
@headers = []
@messages = []
end
- # Serializes the response to a string and returns it.
+ # Serializes the response to a string and returns it
#--
# Implemented in pure/remoting.rb RocketAMF::Pure::Response
def serialize
raise AMFError, 'Must load "rocketamf/pure"'
end
@@ -63,10 +63,12 @@
# Everything else is unsupported
command_msg = m.data
if command_msg.operation == Values::CommandMessage::CLIENT_PING_OPERATION
response_value = Values::AcknowledgeMessage.new(command_msg)
else
- response_value = Values::ErrorMessage.new(Exception.new("CommandMessage #{command_msg.operation} not implemented"), command_msg)
+ e = Exception.new("CommandMessage #{command_msg.operation} not implemented")
+ e.set_backtrace ["RocketAMF::Response each_method_call"]
+ response_value = Values::ErrorMessage.new(command_msg, e)
end
when Values::RemotingMessage
# Using RemoteObject style message calls
remoting_msg = m.data
acknowledge_msg = Values::AcknowledgeMessage.new(remoting_msg)
\ No newline at end of file