Closed Bug 1157257 Opened 9 years ago Closed 9 years ago

Include error's name if it's not a WebDriver error

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: ato, Assigned: ato)

Details

(Keywords: pi-marionette-server)

Attachments

(1 file, 1 obsolete file)

JS errors' message doesn't contain the error name (for example TypeError).  On the client side they are treated as MarionetteException's which can make them hard to debug based on the message alone.

We should look at the type of the error, and if it's not a recognised WebDriver error we should concatenate the Error's name and message property in the message as we marshal to send it back to the client.

The affected function is error.toJSON.
Attached file MozReview Request: bz://1157257/ato (obsolete) —
/r/7493 - Bug 1157257: Include error's name if it's not a WebDriver error

Pull down this commit:

hg pull -r bf9df819b6fe9e6b2289f58275ed79a2692547da https://reviewboard-hg.mozilla.org/gecko/
Attachment #8596562 - Flags: review?(cmanchester)
Comment on attachment 8596562 [details]
MozReview Request: bz://1157257/ato

https://reviewboard.mozilla.org/r/7491/#review6317

Ship It!

::: testing/marionette/error.js:77
(Diff revision 1)
>    return {
> -    message: err.message,
> +    message: msg,
>      stacktrace: err.stack || null,
>      status: err.status
>    };

Cool! Wouldn't hurt to have a test for this in the client, but not crucial.
Attachment #8596562 - Flags: review?(cmanchester) → review+
Assignee: nobody → ato
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/e4f771e6a6c9
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Attachment #8596562 - Attachment is obsolete: true
Attachment #8620111 - Flags: review+
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: