Package io.reactivex.rxjava3.exceptions
Class Exceptions
java.lang.Object
io.reactivex.rxjava3.exceptions.Exceptions
Utility class to help propagate checked exceptions and rethrow exceptions
designated as fatal.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull RuntimeException
Convenience method to throw aRuntimeException
andError
directly or wrap any other exception type into aRuntimeException
.static void
Throws a particularThrowable
only if it belongs to a set of "fatal" error varieties.
-
Constructor Details
-
Exceptions
private Exceptions()Utility class.
-
-
Method Details
-
propagate
Convenience method to throw aRuntimeException
andError
directly or wrap any other exception type into aRuntimeException
.- Parameters:
t
- the exception to throw directly or wrapped- Returns:
- because
propagate
itself throws an exception or error, this is a sort of phantom return value;propagate
does not actually return anything
-
throwIfFatal
Throws a particularThrowable
only if it belongs to a set of "fatal" error varieties. These varieties are as follows:VirtualMachineError
ThreadDeath
LinkageError
onError
methods, but only if the errors are not so catastrophic that such a call would be futile, in which case you simply want to rethrow the error.- Parameters:
t
- theThrowable
to test and perhaps throw- See Also:
-