Package dev.kylesilver.result
Class UnwrapException
java.lang.Object
java.lang.Throwable
java.lang.Exception
dev.kylesilver.result.UnwrapException
- All Implemented Interfaces:
Serializable
This exception is thrown when a value is unwrapped. Unwrapping means that the
Result
was not what was expected and should be treated as fatal. It
is a checked exception to discourage the practice of catching unwraps. To
avoid muddying your method signatures with this exception, consider supplying
a default value or coming up with a way to gracefully handle exceptions. You
can also use the Result.expect(Function)
method to throw a custom
error instead of this one.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
UnwrapException
-