CodableException.wrap constructor

CodableException.wrap(
  1. Object error, {
  2. required String method,
  3. required String hint,
})

Implementation

factory CodableException.wrap(Object error, {required String method, required String hint}) {
  if (error is WrappedCodableException) {
    return WrappedCodableException(method, '$hint->${error.hint}', error.error);
  } else {
    return WrappedCodableException(method, hint, error);
  }
}