Make sure WillPrint ran before starting printing

This commit is contained in:
Calixte Denizet 2023-07-29 17:33:13 +02:00
parent 7ae5a0fef7
commit 8439e11160
4 changed files with 58 additions and 20 deletions

View file

@ -34,6 +34,7 @@ import { Color } from "./color.js";
import { Console } from "./console.js";
import { Doc } from "./doc.js";
import { ProxyHandler } from "./proxy.js";
import { serializeError } from "./app_utils.js";
import { Util } from "./util.js";
function initSandbox(params) {
@ -214,8 +215,7 @@ function initSandbox(params) {
try {
functions[name](args);
} catch (error) {
const value = `${error.toString()}\n${error.stack}`;
send({ command: "error", value });
send(serializeError(error));
}
};
}