Skip to content

Commit 7293260

Browse files
committed
Improved error message on syntax highlight
1 parent 5e4dc4d commit 7293260

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/client/SuperDebug.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
* --sd-code-undefined
8686
* --sd-code-function
8787
* --sd-code-symbol
88+
* --sd-code-error
8889
* --sd-sb-width
8990
* --sd-sb-height
9091
* --sd-sb-track-color
@@ -132,7 +133,7 @@
132133
return '#}F#' + `[function ${value.name}]`;
133134
}
134135
if (value instanceof Error) {
135-
return '#}E#' + value.message;
136+
return '#}E#' + `${value.name}: ${value.message || value.cause || 'uknown error message'}`;
136137
}
137138
return value;
138139
},
@@ -176,7 +177,7 @@
176177
match = match.slice(5, -1);
177178
} else if (match.startsWith('"#}E#')) {
178179
cls = 'error';
179-
match = 'Error: ' + match.slice(5, -1);
180+
match = match.slice(5, -1);
180181
}
181182
}
182183
} else if (/true|false/.test(match)) {
@@ -447,7 +448,6 @@
447448
.super-debug pre::-webkit-scrollbar {
448449
width: var(--sd-sb-width, var(--sd-vscode-sb-width, 1.25rem));
449450
height: var(--sd-sb-height, var(--sd-vscode-sb-height, 1.25rem));
450-
opacity: 0.5;
451451
}
452452
453453
.super-debug pre::-webkit-scrollbar-track {

0 commit comments

Comments
 (0)