Closed Bug 651035 Opened 14 years ago Closed 1 year ago

Need API to determine if a reported error is fatal (internal?)

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED INACTIVE

People

(Reporter: robarnold, Unassigned)

Details

Node uses a fatal error callback via V8::SetFatalErrorHandler. In our JSAPI error reporter handler, we need to determine if a given error report is a fatal one so that we can invoke the V8API callback when appropriate.
If by "fatal" you mean "about to crash/abort", then SpiderMonkey doesn't have fatal errors. However, there are "uncatchable exceptions" (like OOM) which, as the name implies, cannot by caught by try/catch in script and instead return immediately from the JS engine (returning false but with !JS_IsExceptionPending). You can be notified of these errors synchronously through the error reporter hook (see JS_SetErrorReporter). I'm not an expert on this, but the surrounding comments indicate that you can tell between catchable and uncatchable errors being reported.
Assignee: general → nobody
Severity: normal → S3

It looks like V8 uses the term "fatal errors" in the same sense as we use MOZ_ASSERT. This isn't something we support right now, but there doesn't seem to be a strong urge to implement it, either.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.