throwError static method
Future<void>
throwError(
- Object error,
- StackTrace stack, {
- BugType? bugType,
- BugSeverity? bugSeverity,
- Map<
String, dynamic> ? metaData,
Manually report an error to Atelerix
Use this to send custom errors or exceptions to your dashboard.
Parameters:
error- Error object or messagestack- Stack trace associated with the errorbugType- Optional bug classificationbugSeverity- Optional severity levelmetaData- Optional additional context
Example:
try {
await riskyOperation();
} catch (e, stack) {
await Atelerix.throwError(
e,
stack,
bugSeverity: BugSeverity.high,
metaData: {
'userId': '123',
'action': 'payment',
'amount': 100.0,
},
);
}
Implementation
static Future<void> throwError(
Object error,
StackTrace stack, {
BugType? bugType,
BugSeverity? bugSeverity,
Map<String, dynamic>? metaData,
}) async {
await ErrorsHandler().throwError(
error,
stack,
bugType: bugType,
bugSeverity: bugSeverity,
metaData: metaData,
);
}