wrap<T> static method

  1. @Deprecated('Use the global jsErrorWrap method instead')
T wrap<T>(
  1. T callback()
)

Wraps any callback to convert JsErrors to SodiumExceptions.

This simply runs the callback and catches all instances of JsError and rethrows the error message as SodiumException.

Implementation

@Deprecated('Use the global jsErrorWrap method instead')
static T wrap<T>(T Function() callback) => jsErrorWrap<T>(callback);