fromException static method

AlarmException fromException(
  1. Exception ex, [
  2. StackTrace? stacktrace
])

Wraps a Exception within an AlarmException.

Implementation

static AlarmException fromException(
  Exception ex, [
  StackTrace? stacktrace,
]) {
  return AlarmException(
    AlarmErrorCode.unknown,
    message: ex.toString(),
    stacktrace: stacktrace?.toString() ?? StackTrace.current.toString(),
  );
}