mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -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 */
|
/** Parse and execute ExCmds */
|
||||||
export function acceptExCmd(ex_str: string) {
|
export function acceptExCmd(ex_str: string) {
|
||||||
let [func, args] = Parsing.exmode.parser(ex_str)
|
// TODO: Errors should go to CommandLine.
|
||||||
|
|
||||||
try {
|
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) {
|
} catch (e) {
|
||||||
// Errors from func are caught here (e.g. no next tab)
|
// Errors from parser caught here
|
||||||
// TODO: Errors should go to CommandLine.
|
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue