SentcError.fromError constructor

SentcError.fromError(
  1. Object e
)

Implementation

factory SentcError.fromError(Object e) {
  if (e is FrbAnyhowException) {
    return SentcError.fromAnyhowException(e);
  }

  if (e is FfiException) {
    return SentcError.fromFfiException(e);
  }

  return SentcError(status: "client_0", errorMessage: "Unknown exception object: ${e.toString()}");
}