unpackOrThrow method

T unpackOrThrow(
  1. Exception throwable
)

Returns the not null value or throws the given throwable.

Implementation

T unpackOrThrow(Exception throwable) {
  if (this == null) throw throwable;
  return this!;
}