Skip to content

jsapi-util: Make log levels of exceptions consistent

Philip Chimento requested to merge make-exception-log-levels-consistent into master

When an exception originates from user code, and is not caught, that is a programmer error, therefore a critical log message. If an exception is logged elsewhere, or through logError(), then it should be a warning.

For this purpose, introduce gjs_log_exception_uncaught() which should be called when logging any exception after calling into user code.

Previously SyntaxErrors were logged as criticals and any other exceptions as warnings.

Merge request reports