This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* This can be very useful in production environments when you don't want your app to just crash if a developer forgot to guard against an unexpected JS level exception.
* @deprecated Since runtime 9.1 uncaught JS errors no longer crash the app by default, so this flag is
* no longer needed; remove it, or set the top-level `uncaughtErrorPolicy` instead.
* The CLI copies a `true` value here to the top level of the emitted `package.json`, where it is still
* honored exactly like the top-level `discardUncaughtJsExceptions`.
*/
discardUncaughtJsExceptions?: boolean;
/**
Expand Down
Expand Up
@@ -243,6 +245,19 @@ interface ISecurityConfig {
type BundlerType = 'webpack' | 'vite';
/**
* What the runtime does with an uncaught JS error or unhandled promise rejection once no
* `globalThis` `error` / `unhandledrejection` listener has called `preventDefault()` on it.
*
* - `'report'` - log the error, fire `Application.uncaughtErrorEvent` and keep the app running.
* - `'throw'` - after reporting, rethrow the error natively. An error thrown while a native
* caller is on the stack is rethrown synchronously at that boundary (a native try/catch
* around the call can handle it); errors from timers, microtasks and rejections are thrown
* from a clean frame on the runtime loop. The app terminates only if nothing catches it,
* in which case crash reporters capture it with the JavaScript stack attached.
*/
export type UncaughtErrorPolicy = 'report' | 'throw';
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(core): type uncaughtErrorPolicy and deprecate discardUncaughtJsExceptions #11356
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
feat(core): type uncaughtErrorPolicy and deprecate discardUncaughtJsExceptions #11356
Filter by extension
Viewed files
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.