diff --git a/src/cmPlugin/cmUtils.ts b/src/cmPlugin/cmUtils.ts index c9dabf6..14a525e 100644 --- a/src/cmPlugin/cmUtils.ts +++ b/src/cmPlugin/cmUtils.ts @@ -302,14 +302,14 @@ export async function replaceRange(cm, context, getNewRange: Function, done: Fun if (done) done({ row: selection.row, column: selection.column }); } - catch (error) { + catch (e) { await context.postMessage({ name: 'alert', - text: error.toString(), + text: e.toString(), title: "Error" }); if (error) - error(error); + error(e); } } else {