mirror of https://github.com/pyodide/pyodide.git
[pre-commit.ci] pre-commit autoupdate (#3204)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.2 → v3.0.0-alpha.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.2...v3.0.0-alpha.3) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
c76573de1c
commit
8093089e84
|
@ -77,7 +77,7 @@ repos:
|
|||
types_or: [c++, c, cuda]
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: "v3.0.0-alpha.2"
|
||||
rev: "v3.0.0-alpha.3"
|
||||
hooks:
|
||||
- id: prettier
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ They can only be used in a function with a `finally:` label which should handle
|
|||
|
||||
### JavaScript to CPython calling convention adaptors
|
||||
|
||||
If we call a JavaScript function from C and that JavaScript function throws an error, it is impossible to catch it in C. We define two `EM_JS` adaptors to convert from the JavaScript calling convention to the CPython calling convention. The point of this is to ensure that errors that occur in `EM_JS` functions can be handled in C code using the ` FAIL_*`` macros. When compiled with `DEBUG_F`, when a JavaScript error is thrown a message will also be written to `console.error`. The wrappers do roughly the following:
|
||||
If we call a JavaScript function from C and that JavaScript function throws an error, it is impossible to catch it in C. We define two `EM_JS` adaptors to convert from the JavaScript calling convention to the CPython calling convention. The point of this is to ensure that errors that occur in `EM_JS` functions can be handled in C code using the `FAIL_*`` macros. When compiled with `DEBUG_F`, when a JavaScript error is thrown a message will also be written to `console.error`. The wrappers do roughly the following:
|
||||
|
||||
```javascript
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue