summaryrefslogtreecommitdiff
path: root/ext/js/comm
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/comm')
-rw-r--r--ext/js/comm/mecab.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/comm/mecab.js b/ext/js/comm/mecab.js
index 6d0f3f40..f3ad7b51 100644
--- a/ext/js/comm/mecab.js
+++ b/ext/js/comm/mecab.js
@@ -17,6 +17,7 @@
*/
import {EventListenerCollection} from '../core.js';
+import {toError} from '../core/to-error.js';
/**
* This class is used to connect Yomitan to a native component that is
@@ -235,7 +236,7 @@ export class Mecab {
try {
await this._setupPortPromise;
} catch (e) {
- throw new Error(e instanceof Error ? e.message : `${e}`);
+ throw toError(e);
}
}