mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-18 07:34:54 +00:00
main: Improve error formatting in logError()
We override GJS's default logError(). This adds the improved formatting
of error stack traces that gjs-console would otherwise do as part of
logError().
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3041>
(cherry picked from commit e6f35c5e88)
This commit is contained in:
parent
8421846cff
commit
7c0675e2fa
1 changed files with 2 additions and 1 deletions
|
|
@ -45,6 +45,7 @@ import * as XdndHandler from './xdndHandler.js';
|
|||
import * as KbdA11yDialog from './kbdA11yDialog.js';
|
||||
import * as LocatePointer from './locatePointer.js';
|
||||
import * as PointerA11yTimeout from './pointerA11yTimeout.js';
|
||||
import {formatError} from '../misc/errorUtils.js';
|
||||
import * as ParentalControlsManager from '../misc/parentalControlsManager.js';
|
||||
import * as Util from '../misc/util.js';
|
||||
|
||||
|
|
@ -144,7 +145,7 @@ function _sessionUpdated() {
|
|||
export async function start() {
|
||||
globalThis.log = console.log;
|
||||
globalThis.logError = function (err, msg) {
|
||||
const args = [err];
|
||||
const args = [formatError(err)];
|
||||
try {
|
||||
// toString() can throw
|
||||
if (msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue