Browse Source
Merge pull request #1062 from gre/no-longer-exit-on-uncaughtException
uncaughtException: no longer exit(1)
master
NastiaS
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
2 deletions
-
src/internals/index.js
-
src/logger/logger.js
|
|
@ -16,7 +16,10 @@ process.on('uncaughtException', err => { |
|
|
|
type: 'uncaughtException', |
|
|
|
error: serializeError(err), |
|
|
|
}) |
|
|
|
process.exit(1) |
|
|
|
// FIXME we should ideally do this:
|
|
|
|
// process.exit(1)
|
|
|
|
// but for now, until we kill all exceptions:
|
|
|
|
logger.critical(err, 'uncaughtException') |
|
|
|
}) |
|
|
|
|
|
|
|
const defers = {} |
|
|
|
|
|
@ -364,7 +364,13 @@ export default { |
|
|
|
logger.log('error', ...args) |
|
|
|
}, |
|
|
|
|
|
|
|
critical: (error: Error) => { |
|
|
|
critical: (error: Error, context?: string) => { |
|
|
|
if (context) { |
|
|
|
captureBreadcrumb({ |
|
|
|
category: 'context', |
|
|
|
message: context, |
|
|
|
}) |
|
|
|
} |
|
|
|
logger.log('error', error) |
|
|
|
if (!process.env.STORYBOOK_ENV) { |
|
|
|
try { |
|
|
|