src: log errors from exmode.parser to browser console

This commit is contained in:
Colin Caine 2017-10-05 13:26:28 +01:00
parent dca17270ed
commit 24fbd85a75

View file

@ -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)
} }
} }