hide regex error behind debug flag

This commit is contained in:
Jörg Breitbart
2018-09-14 15:43:29 +02:00
parent 3143ad7f02
commit 4b68976dfb
+5 -1
View File
@@ -186,7 +186,11 @@ export class Linkifier extends EventEmitter implements ILinkifier {
if (!uri) {
// something matched but does not comply with the given matchIndex
// since this is most likely a bug the regex itself we simply do nothing here
// TODO: should this be logged for debugging?
// DEBUG: print match and throw
if ((<any>this._terminal).debug) {
console.log({match, matcher});
throw new Error('match found without corresponding matchIndex');
}
break;
}