call<T> method

T call<T>(
  1. String op,
  2. T run()
)

Runs run, wrapping any non-crypto exception as CryptoException.

Implementation

T call<T>(String op, T Function() run) {
  try {
    return run();
  } on BuError {
    rethrow;
  } catch (e) {
    throw CoreErrors.cryptoFailed('$tag.$op', reason: e.toString());
  }
}