Closed Bug 1035296 Opened 5 years ago Closed 5 years ago

Make protocol.js pass error messages for unknownErrors

Categories

(DevTools :: Style Editor, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 34

People

(Reporter: jwalker, Assigned: jwalker)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

Better error message needed.
Assignee: nobody → jwalker
Status: NEW → ASSIGNED
https://tbpl.mozilla.org/?tree=Try&rev=05d109f05f31
Summary: CSS Coverage gives 'unknownError' when there is no coverage data → Make protocol.js pass error messages for unknownErrors
In an actor throws an exception, protocol.js catches it and passes a packet like this:

    {
      error: "unknownError",
      message: ex.message
    }

And then in the client, the promise was resolved like this:

    if (packet.error) reject(packet.error);

Which means that we lose everything there is to know about the original exception. This change passes on the error message, which is particularly useful to GCLI which doesn't then have to have some magic to work out what might have gone wrong.
Attachment #8454375 - Flags: review?(past) → review+
https://hg.mozilla.org/mozilla-central/rev/114268fab626
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Depends on: 1038279
Backed out per the discussion in bug 1038279. Sorry Joe, this work is very righteous :(

https://hg.mozilla.org/mozilla-central/rev/31c5d0a5115d
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Firefox 33 → ---
Clean on try: https://tbpl.mozilla.org/?tree=Try&rev=6d98639e8e78
Doesn't seems to throw up the false +ves that the previous patch did
Attachment #8454375 - Attachment is obsolete: true
Noticed while checking recent changes that rev 65ae48644b2e seem to be a no-op ('message' is not used anywhere). Something must be missing from the patch, probably
-        deferred.reject(packet.error);
+        deferred.reject(message);
Thanks Sami, well spotted.
Panos, this also removes the 'Protocol error' part in GCLI.
Attachment #8465372 - Attachment is obsolete: true
Attachment #8465517 - Flags: review?(past)
Attachment #8465517 - Flags: review?(past) → review+
https://hg.mozilla.org/mozilla-central/rev/215da263fe06
Status: REOPENED → RESOLVED
Closed: 5 years ago5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
QA Whiteboard: [qa-]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.