-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Worker support] Error handling and warnings #1381
Comments
I have started to investigate the issue.
It seems that synclink propagates the As an additional data point, I also tried to run the test with this patch: diff --git a/pyscriptjs/src/remote_interpreter.ts b/pyscriptjs/src/remote_interpreter.ts
index a245aaa..7fd2f94 100644
--- a/pyscriptjs/src/remote_interpreter.ts
+++ b/pyscriptjs/src/remote_interpreter.ts
@@ -2,7 +2,7 @@ import type { AppConfig } from './pyconfig';
import { version } from './version';
import { getLogger } from './logger';
import { Stdio } from './stdio';
-import { InstallError, ErrorCode } from './exceptions';
+import { InstallError, ErrorCode, UserError } from './exceptions';
import { robustFetch } from './fetch';
import type { loadPyodide as loadPyodideDeclaration, PyodideInterface, PyProxy, PyProxyDict } from 'pyodide';
import type { ProxyMarked } from 'synclink';
@@ -114,6 +114,9 @@ export class RemoteInterpreter extends Object {
fullStdLib: false,
}),
);
+
+ throw new UserError("hello UserError");
+
this.interface.registerComlink(Synclink);
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
this.FS = this.interface.FS; And I confirm that with In the worker case, the console shows this log:
I guess it's an upstream bug of Synclink. /cc @hoodmane |
This is a follow-up of #1333 (once it's merged).
It seems that for some reason, error and warning banners don't appear when we run in a worker. There are 3 tests which are skipped because of that:
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 152 to 170 in ef0e838
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 172 to 189 in ef0e838
pyscript/pyscriptjs/tests/integration/test_01_basic.py
Lines 274 to 289 in ef0e838
The text was updated successfully, but these errors were encountered: