public class BuckUncheckedExecutionException extends RuntimeException implements ExceptionWithContext, WrapsException
Users should prefer throw new BuckUncheckedExecutionException(exception); to throw new RuntimeException(exception); for throwing arbitrary checked exceptions as unchecked.
Even better would be to specify that the function throws BuckExecutionException.
| Constructor and Description |
|---|
BuckUncheckedExecutionException(String message) |
BuckUncheckedExecutionException(String message,
String context) |
BuckUncheckedExecutionException(String message,
Throwable cause,
String context) |
BuckUncheckedExecutionException(Throwable cause) |
BuckUncheckedExecutionException(Throwable cause,
String context) |
BuckUncheckedExecutionException(Throwable cause,
String format,
Object... args) |
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getContext() |
String |
getMessage() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetRootCausepublic BuckUncheckedExecutionException(String message)
public BuckUncheckedExecutionException(String message, @Nullable String context)
public BuckUncheckedExecutionException(String message, @Nullable Throwable cause, @Nullable String context)
public BuckUncheckedExecutionException(Throwable cause)
public BuckUncheckedExecutionException(Throwable cause, @Nullable String context)
public String getMessage()
getMessage in class Throwablepublic Optional<String> getContext()
getContext in interface ExceptionWithContext