Expand description
Renderer-side error reporter. The web error boundary calls this
from componentDidCatch so the crash lands in the same rotating
log file as everything else, instead of vanishing into the webview
devtools console where no end user ever looks.
Constantsยง
- MAX_
FIELD_ ๐BYTES - Per-field cap. The renderer can be compromised (supporter custom CSS is a real injection surface), so we treat the message/stack as attacker-controlled and refuse to log more than ~8 KiB per field. Real stack traces are well under this; a 4 GiB stack on a tight loop is a disk-fill DoS.
Functionsยง
- redact_
and_ ๐truncate - Bound the field at
MAX_FIELD_BYTESand strip anything that looks like a Lemon Squeezy licence key or a manualENT1-โฆtoken โ the renderer should never have these in scope, but a stack trace that captured local variables (or a user CSS that embedded one) would otherwise leak the secret into the log file. - report_
renderer_ error