errorWithException method

Future<LogResponse> errorWithException(
  1. String message,
  2. Object exception, {
  3. StackTrace? stackTrace,
  4. String? metadata,
  5. String? userIdentifier,
  6. String? sessionId,
})

Send an ERROR level log from an exception

Implementation

Future<LogResponse> errorWithException(
  String message,
  Object exception, {
  StackTrace? stackTrace,
  String? metadata,
  String? userIdentifier,
  String? sessionId,
}) {
  return error(
    message,
    stackTrace: stackTrace?.toString() ?? exception.toString(),
    metadata: metadata,
    userIdentifier: userIdentifier,
    sessionId: sessionId,
  );
}