mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
src: log errors from exmode.parser to browser console
This commit is contained in:
parent
dca17270ed
commit
24fbd85a75
1 changed files with 9 additions and 5 deletions
|
@ -58,13 +58,17 @@ export function acceptKey(keyevent: Event) {
|
|||
|
||||
/** Parse and execute ExCmds */
|
||||
export function acceptExCmd(ex_str: string) {
|
||||
let [func, args] = Parsing.exmode.parser(ex_str)
|
||||
|
||||
// TODO: Errors should go to CommandLine.
|
||||
try {
|
||||
func(...args)
|
||||
let [func, args] = Parsing.exmode.parser(ex_str)
|
||||
try {
|
||||
func(...args)
|
||||
} catch (e) {
|
||||
// Errors from func are caught here (e.g. no next tab)
|
||||
console.error(e)
|
||||
}
|
||||
} catch (e) {
|
||||
// Errors from func are caught here (e.g. no next tab)
|
||||
// TODO: Errors should go to CommandLine.
|
||||
// Errors from parser caught here
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue