Closed
Bug 1094381
Opened 10 years ago
Closed 8 years ago
Marionette server should return to the client any internal errors/exceptions it hits
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
INCOMPLETE
People
(Reporter: mdas, Unassigned)
Details
(Keywords: pi-marionette-server)
Whenever possible (ie: whenever the marionette-server doesn't go down or the connection isn't severed), if the server hits an exception when processing a command, we should return that exception to the client. For example, if the client wants to call send_keys, then we should do our best to execute the send_keys command, but if it fails (let's say an uncaught exception is thrown from marionette-sendkeys.js for some reason) and the server can still continue working, we should return that uncaught exception to the client. We currently just hang instead of respond, and the user has to go and look at gecko logs for any errors, which makes it a time consuming and annoying process to go through.
Comment 1•10 years ago
|
||
Using callbacks for this kind of this is totally doable if your really paranoid about adding lots of try/catch on the other hand using promises (generators add tons of memory overhead still lets not go there yet) have a clear path towards handling both passes errors and uncaught exceptions... Something like this for example could be used. on('marionetteCommand', function(stuffFromClient) { runSomeMarionetteCommand(stuffFromClient).then(function(response) { // send response }).catch(function(err) { // handle some error in either sending the response or from further up the promise chain... // log internal error // send internal error message to client }); });
Updated•10 years ago
|
Keywords: ateam-marionette-server
Comment 2•8 years ago
|
||
we have solved this as part of the larger refactor we did. THere may be edge cases but we can raise bugs accordingly.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•