Skip to content

Commit 74ab0bd

Browse files
author
Luca Forstner
committed
Rename option
1 parent 71bcfe0 commit 74ab0bd

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-additional-listener-test-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Sentry.init({
66
return integrations.map(integration => {
77
if (integration.name === 'OnUncaughtException') {
88
return new Sentry.Integrations.OnUncaughtException({
9-
exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered: false,
9+
exitEvenIfOtherHandlersAreRegistered: false,
1010
});
1111
} else {
1212
return integration;

packages/node-integration-tests/suites/public-api/OnUncaughtException/mimic-native-behaviour-no-additional-listener-test-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Sentry.init({
66
return integrations.map(integration => {
77
if (integration.name === 'OnUncaughtException') {
88
return new Sentry.Integrations.OnUncaughtException({
9-
exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered: false,
9+
exitEvenIfOtherHandlersAreRegistered: false,
1010
});
1111
} else {
1212
return integration;

packages/node-integration-tests/suites/public-api/OnUncaughtException/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ describe('OnUncaughtException integration', () => {
2828
});
2929
});
3030

31-
describe('with `exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered` set to false', () => {
31+
describe('with `exitEvenIfOtherHandlersAreRegistered` set to false', () => {
3232
test('should close process on uncaught error with no additional listeners registered', done => {
3333
expect.assertions(3);
3434

packages/node/src/integrations/onuncaughtexception.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ interface OnUncaughtExceptionOptions {
1616
* - `false`: The SDK will exit the process on all uncaught errors.
1717
* - `true`: The SDK will only exit the process when there are no other 'uncaughtException' handlers attached.
1818
*/
19-
exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered: boolean;
19+
exitEvenIfOtherHandlersAreRegistered: boolean;
2020

2121
/**
2222
* This is called when an uncaught error would cause the process to exit.
@@ -53,7 +53,7 @@ export class OnUncaughtException implements Integration {
5353
*/
5454
public constructor(options: Partial<OnUncaughtExceptionOptions> = {}) {
5555
this._options = {
56-
exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered: true,
56+
exitEvenIfOtherHandlersAreRegistered: true,
5757
...options,
5858
};
5959
}
@@ -106,8 +106,7 @@ export class OnUncaughtException implements Integration {
106106
}, 0);
107107

108108
const processWouldExit = userProvidedListenersCount === 0;
109-
const shouldApplyFatalHandlingLogic =
110-
this._options.exitEvenWhenOtherOnUncaughtExceptionHandlersAreRegistered || processWouldExit;
109+
const shouldApplyFatalHandlingLogic = this._options.exitEvenIfOtherHandlersAreRegistered || processWouldExit;
111110

112111
if (!caughtFirstError) {
113112
const hub = getCurrentHub();

0 commit comments

Comments
 (0)