Package com.oorian
Class OorianRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.oorian.OorianRuntimeException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HttpFileException
Base runtime exception class for the Oorian framework.
OorianRuntimeException serves as the parent class for all runtime exceptions
in the Oorian framework. It extends RuntimeException and adds the ability
to track the request URL where the exception occurred, aiding in debugging and
error reporting.
Key Features:
- Stores the URL of the request that caused the exception
- Wraps the underlying cause for stack trace preservation
- Provides contextual information for error handling
Usage:
try {
// Some operation
} catch (Exception e) {
throw new OorianRuntimeException(request.getRequestURL().toString(), e);
}
- Since:
- 2021
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionOorianRuntimeException(String requestUrl, Throwable thrwbl) Constructs a new OorianRuntimeException with the specified request URL and cause. -
Method Summary
Modifier and TypeMethodDescriptionReturns the URL of the request that caused this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
OorianRuntimeException
Constructs a new OorianRuntimeException with the specified request URL and cause.The request URL is stored for later retrieval and the cause is passed to the parent constructor for standard exception chaining.
- Parameters:
requestUrl- the URL of the request that caused this exceptionthrwbl- the underlying cause of this exception
-
-
Method Details
-
getRequestUrl
Returns the URL of the request that caused this exception.This information is useful for debugging and logging purposes, allowing developers to identify which page or endpoint caused the error.
- Returns:
- the request URL, or null if not set
-