mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
extensionSystem: Don't log error name
logExtensionError() currently saves the error message by calling toString() on the passed error. That's convenient as it allows to pass a string instead of a "proper" error, but the result isn't great for the common Error case: Its toString() method prefixes the message with the error name, which usually is just "Error:". The plain message is more suitable for displaying it to users, so use that for Error objects. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2337
This commit is contained in:
parent
d2583aa47b
commit
48e6a58250
1 changed files with 2 additions and 1 deletions
|
|
@ -260,7 +260,8 @@ var ExtensionManager = class {
|
|||
if (!extension)
|
||||
return;
|
||||
|
||||
let message = error.toString();
|
||||
const message = error instanceof Error
|
||||
? error.message : error.toString();
|
||||
|
||||
extension.error = message;
|
||||
extension.state = ExtensionState.ERROR;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue