try {
thisFunDoesNotExist();
} catch (error) {
Sentry.captureException(error);
throw error; // assume this is not catch anywhere else until global error handler
}
The example above shows code snippet which causes the session not being marked as crashed.
But the error reached the global handler and the session should be marked as crashed.