runSyncExit method

Exit<L, R> runSyncExit()

{@category execution}

Implementation

Exit<L, R> runSyncExit() {
  try {
    final result = _unsafeRun(Context.env(null));
    if (result is Future) {
      return Left(Die.current(
        Exception("runSyncExit cannot execute async Effect"),
      ));
    }
    return result;
  } on Cause<L> catch (cause) {
    return Left(cause);
  } catch (error, stackTrace) {
    return Left(Die(error, stackTrace));
  }
}