Closed Bug 1764439 Opened 3 years ago Closed 2 years ago

Handle errors in custom formatters

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: sebo, Assigned: sebo)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

If the definition of a custom formatter is incorrect or throws an error, that error should be logged to the console.

Such errors can be an incorrect JsonML returned by the header or body method or an exception thrown by any of the methods.

Sebastian

Summary: Handle errors in custom formattesr → Handle errors in custom formatters

Sebastian, here's what it could look like, at least for errors caused by faulty header functions: https://phabricator.services.mozilla.com/D155480
Script url, line and columns seems to be available so we can populate the nsIScriptError object with it.
Hope this helps, don't hesitate to ping me if you have any question about this.

Thank you Nicolas! I will have a look into this.

Sebastian

Errors in custom formatters are now logged to the web console to notify users so they can correct the errors.

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
See Also: → 1805062
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/60fd58f8b289 Handled errors in custom formatters. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: