// Messages between the main thread (scanner.ts) and the worker (host.ts).// Internal: not part of the public API.exportfunctionerrorMessage(e) {
if (e instanceofError)
return e.message || e.name;
try {
returnString(e);
}
catch {
return'unknown error';
}
}