Skip to content

Commit

Permalink
fix: log to logger before Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
nullishamy committed Jan 28, 2024
1 parent 9cf06ef commit 1e5dc2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { internalLog } from '../communication/internal'
*/
export function setup (): void {
process.setUncaughtExceptionCaptureCallback(err => {
logger.error(err)
internalLog.error({
type: 'text',
content: `Encountered uncaught exception: ${err.message} \n ${err.stack}`,
ctx: undefined
})
logger.error(err)
})
}

0 comments on commit 1e5dc2f

Please sign in to comment.