void setErrorsFatal(bool errorsAreFatal)

Set whether uncaught errors will terminate the isolate.

If errors are fatal, any uncaught error will terminate the isolate event loop and shut down the isolate.

This call requires the terminateCapability for the isolate. If the capability is not correct, no change is made.

Since isolates run concurrently, it's possible for it to exit due to an error before errors are set non-fatal. To avoid this, either use the corresponding parameter to the spawn function, or start the isolate paused, set errors non-fatal and then resume the isolate.

Source

external void setErrorsFatal(bool errorsAreFatal);