further fixes to error reporting: extra context, disable colour
This commit is contained in:
parent
3999dd3012
commit
6e666c0265
3 changed files with 13 additions and 5 deletions
|
@ -36,11 +36,14 @@ export class ConnectionStatus extends HTMLElement {
|
|||
|
||||
showError(error) {
|
||||
this.errorDialog.showModal();
|
||||
if (typeof error.error == "string") {
|
||||
this.errorText.value = error.error.toString();
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
if (error.stack != null && error.stack != "") {
|
||||
this.errorText.textContent = `${error.toString()}\n\n${error.stack}`;
|
||||
this.errorText.value = `${error.toString()}\n\n${error.stack}`;
|
||||
} else {
|
||||
this.errorText.textContent = error.toString();
|
||||
this.errorText.value = error.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue