Class SuperException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BadRequestException, NotFoundException

public class SuperException extends RuntimeException
Represents a super exception class. Superclass for custom exceptions, providing common error status handling.

Example:

To create a custom exception that inherits from SuperException, follow these steps:

Create a new exception class:

 public class YourException extends SuperException {

     public YourException(String message) {

         super(message, HttpStatus.YOUR_STATUS);
     }
 }
 
Since:
0.1.0
See Also:
  • Constructor Details

    • SuperException

      public SuperException(String message, org.springframework.http.HttpStatusCode status)
      Constructs a new SuperException with the given message and HTTP status.
      Parameters:
      message - The error message.
      status - The HTTP status code.
    • SuperException

      public SuperException(String message, org.springframework.http.HttpStatusCode status, Throwable cause)
      Constructs a new SuperException with the given message and HTTP status.
      Parameters:
      message - The error message.
      status - The HTTP status code.
      cause - The cause of the exception as a Throwable.