Package com.oorian

Class OorianRuntimeException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
HttpFileException

public class OorianRuntimeException extends RuntimeException
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 Details

    • OorianRuntimeException

      public OorianRuntimeException(String requestUrl, Throwable thrwbl)
      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 exception
      thrwbl - the underlying cause of this exception
  • Method Details

    • getRequestUrl

      public String 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