mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
14 lines
328 B
TypeScript
14 lines
328 B
TypeScript
import * as Sentry from '@sentry/react';
|
|
|
|
export function logException(ex: Error, context?: any): void {
|
|
Sentry.withScope(scope => {
|
|
if (context) {
|
|
scope.setExtra('context', context);
|
|
}
|
|
|
|
Sentry.captureException(ex);
|
|
});
|
|
/* eslint no-console:0 */
|
|
window.console && console.error && console.error(ex);
|
|
}
|