Skip to content

dbusServices/extensions: Improve error message formatting

See gjs#584 (closed) for a user report.

Previously, SyntaxErrors thrown while opening extension preferences wouldn't display the file/line/column where the syntax error occurred. This replaces the stringification of the exception and its stack property, with a more comprehensive formatter that displays location information for SyntaxErrors, as well as the .cause property of the error if it is present. This formatting is equivalent to what we do in gjs-console when logging an error.

Merge request reports