public class UaException extends Exception implements UaExceptionStatus
| Constructor and Description |
|---|
UaException(long statusCode) |
UaException(long statusCode,
String message) |
UaException(long statusCode,
String message,
Throwable cause) |
UaException(long statusCode,
Throwable cause) |
UaException(StatusCode statusCode) |
UaException(StatusCode statusCode,
String message) |
UaException(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
static Optional<UaException> |
extract(Throwable ex)
If
ex is a UaException, or if a UaException can be found by walking up the exception
cause chain, return it. |
static Optional<StatusCode> |
extractStatusCode(Throwable ex) |
String |
getMessage() |
StatusCode |
getStatusCode() |
String |
toString() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTracepublic UaException(long statusCode)
public UaException(StatusCode statusCode)
public UaException(Throwable cause)
public UaException(long statusCode,
Throwable cause)
public UaException(long statusCode,
String message)
public UaException(StatusCode statusCode, String message)
public StatusCode getStatusCode()
getStatusCode in interface UaExceptionStatusStatusCode associated with the exception.public String getMessage()
getMessage in interface UaExceptionStatusgetMessage in class Throwablepublic static Optional<UaException> extract(Throwable ex)
ex is a UaException, or if a UaException can be found by walking up the exception
cause chain, return it.extract in interface UaExceptionStatusex - the Throwable to extract from.UaException if one was present in the exception chain.public static Optional<StatusCode> extractStatusCode(Throwable ex)
Copyright © 2025. All rights reserved.