diff options
| author | dakkar <dakkar@thenautilus.net> | 2024-08-03 18:04:06 +0100 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2024-08-03 18:04:06 +0100 |
| commit | f0dd0b8993a904716fcbc37ff02d81865fa444b1 (patch) | |
| tree | 5c3a4c5236e75c1789ed41295ccb6eab400b6a99 /packages/frontend/src/plugin.ts | |
| parent | update testing instructions (diff) | |
| download | sharkey-f0dd0b8993a904716fcbc37ff02d81865fa444b1.tar.gz sharkey-f0dd0b8993a904716fcbc37ff02d81865fa444b1.tar.bz2 sharkey-f0dd0b8993a904716fcbc37ff02d81865fa444b1.zip | |
revert AiScript hack for plugins
aiscript 0.19 should have fixed the problem, and no longer `abort`
when an error gets handled (or, in this case, logged)
Diffstat (limited to 'packages/frontend/src/plugin.ts')
| -rw-r--r-- | packages/frontend/src/plugin.ts | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/packages/frontend/src/plugin.ts b/packages/frontend/src/plugin.ts index a0a624ace7..81233a5a5e 100644 --- a/packages/frontend/src/plugin.ts +++ b/packages/frontend/src/plugin.ts @@ -28,31 +28,10 @@ export async function install(plugin: Plugin): Promise<void> { }, log: (): void => { }, - /* dakkar 2024-06-20 - - passing an `err` triggers an unwanted side-effect inside the - AiScript Interpreter: - - - the plugin code throws an exception of any kind (in the - specific case that made us look, it was `note.text.split(...)` - on a note with no text) - - - the Interpreter's `handleError` calls `this.abort()` before - calling our `err` - - - from that point on, every evaluation of that Interpreter object - returns null - - - which, at least inside a noteViewInterruptor, causes all notes - to be replaced with a null - - I'm reporting this problem upstream, in the meantime we'll have - to do without error logs - */ - // err: (err): void => { - // pluginLogs.value.get(plugin.id).push(`${err}`); - // throw err; // install時のtry-catchに反応させる - // }, + err: (err): void => { + pluginLogs.value.get(plugin.id).push(`${err}`); + throw err; // install時のtry-catchに反応させる + }, }); initPlugin({ plugin, aiscript }); |