Class AthRuntimeException

  • All Implemented Interfaces:
    Serializable

    public class AthRuntimeException
    extends RuntimeException
    Runtime exception variant of AthException for unchecked exceptions in the ATH framework.

    This class should be used for exceptions that don't need to be declared in method signatures but still require the same structured handling and logging as checked exceptions.

    Usage Guidelines:

    • Use for programming errors that shouldn't be caught
    • Use for exceptions that indicate system configuration issues
    • Use when exception handling would clutter the code unnecessarily
    Since:
    1.0
    Version:
    1.0
    Author:
    Acumen Velocity
    See Also:
    Serialized Form
    • Constructor Detail

      • AthRuntimeException

        public AthRuntimeException​(String format,
                                   Object... args)
        Creates a new AthRuntimeException with a formatted message.
        Parameters:
        format - the message format string with {} placeholders
        args - the arguments to substitute into the format string
      • AthRuntimeException

        public AthRuntimeException​(Throwable cause)
        Creates a new AthRuntimeException with a given parent exception cause.
        Parameters:
        cause - the underlying exception that caused this exception
      • AthRuntimeException

        public AthRuntimeException​(Throwable cause,
                                   String message)
        Creates a new AthRuntimeException with a given message and parent exception cause.
        Parameters:
        cause - the underlying exception that caused this exception
        message - the descriptive text of the exception message
      • AthRuntimeException

        public AthRuntimeException​(Throwable cause,
                                   String format,
                                   Object... args)
        Creates a new AthRuntimeException with a formatted message and cause.
        Parameters:
        cause - the underlying exception that caused this exception
        format - the message format string with {} placeholders
        args - the arguments to substitute into the format string
    • Method Detail

      • logAndThrow

        public static void logAndThrow​(Class<?> loggingClass,
                                       Throwable cause,
                                       String format,
                                       Object... args)
        Logs an error message with cause and throws an AthRuntimeException.
        Parameters:
        loggingClass - the class where the error occurred (for logging context)
        cause - the underlying exception that caused this error
        format - the error message format string with {} placeholders
        args - the arguments to substitute into the format string
        Throws:
        AthRuntimeException - always throws an AthRuntimeException after logging
      • logAndThrow

        public static void logAndThrow​(Class<?> loggingClass,
                                       Throwable cause)
        Logs an error with just the cause and throws an AthRuntimeException.
        Parameters:
        loggingClass - the class where the error occurred (for logging context)
        cause - the underlying exception that caused this error
        Throws:
        AthRuntimeException - always throws an AthRuntimeException after logging
      • logAndThrow

        public static void logAndThrow​(Class<?> loggingClass,
                                       String format,
                                       Object... args)
        Logs an error message and throws an AthRuntimeException.
        Parameters:
        loggingClass - the class where the error occurred (for logging context)
        format - the error message format string with {} placeholders
        args - the arguments to substitute into the format string
        Throws:
        AthRuntimeException - always throws an AthRuntimeException after logging