Displaying only message in the Dialog error (and not the exception name in front of the message)
This commit is contained in:
parent
a58d6353cd
commit
01ce94585a
1 changed files with 7 additions and 1 deletions
|
@ -10,7 +10,13 @@ function createErrorStore() {
|
|||
subscribe,
|
||||
addErrorMessage: (e: string|Error): void => {
|
||||
update((messages) => {
|
||||
messages.push(e.toString());
|
||||
let message: string;
|
||||
if (e instanceof Error) {
|
||||
message = e.message;
|
||||
} else {
|
||||
message = e;
|
||||
}
|
||||
messages.push(message);
|
||||
return messages;
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue