Package dev.daymor.sakuraboot.exceptions
Class SuperException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.daymor.sakuraboot.exceptions.SuperException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BadRequestException
,NotFoundException
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 Summary
ConstructorsConstructorDescriptionSuperException
(String message, org.springframework.http.HttpStatusCode status) Constructs a new SuperException with the given message and HTTP status.SuperException
(String message, org.springframework.http.HttpStatusCode status, Throwable cause) Constructs a new SuperException with the given message and HTTP status. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SuperException
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.
-