exception static method

void exception(
  1. Object exception, {
  2. StackTrace? stackTrace,
})

exception method to handle exceptions and log them with error log level.

Implementation

static void exception(Object exception, {StackTrace? stackTrace}) {
  final message = exception.toString();
  _instance._logger.error(
    message,
    null,
    stackTrace,
  );
}