Skip to content

Commit 8fa02ef

Browse files
author
nani
committed
Some browsers add the error message in the stack text, remove it.
1 parent 15e4690 commit 8fa02ef

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.vscode
2+
/jsetimos.js.map

jsetimos.js

+7-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsetimos.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -3360,11 +3360,19 @@ class JSEtimos
33603360
catch (e)
33613361
{
33623362
if (e instanceof LexerError || e instanceof ParserError || e instanceof RuntimeError)
3363-
extSystem.print(e.stack)
3363+
this.printError(e)
33643364
else
33653365
throw e
33663366
}
33673367
}
3368+
3369+
printError(e: Error)
3370+
{
3371+
// In chrome the message is duplicated
3372+
extSystem.print(e.message)
3373+
const stack = e.stack.replace(e.message,"")
3374+
extSystem.print(stack)
3375+
}
33683376
}
33693377

33703378
var extSystem: ExtSystem = undefined

0 commit comments

Comments
 (0)