Package api.mpba.rastvdmy.exception
Class ApplicationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
api.mpba.rastvdmy.exception.ApplicationException
- All Implemented Interfaces:
Serializable
This class represents a custom exception in the application.
It extends the RuntimeException class and includes an HttpStatus and a message.
The HttpStatus represents the HTTP status code that should be returned when this exception is thrown.
The message provides additional information about the exception.
- See Also:
-
Constructor Summary
ConstructorDescriptionApplicationException
(org.springframework.http.HttpStatus httpStatus, String message) Constructor for the ApplicationException class. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ApplicationException
Constructor for the ApplicationException class.- Parameters:
httpStatus
- The HTTP status code that should be returned when this exception is thrown. This can be used to inform clients of the nature of the error.message
- The message that provides additional information about the exception. This message is intended to give more context to the error.
-
-
Method Details
-
getMessage
Returns the message of the exception.- Overrides:
getMessage
in classThrowable
- Returns:
- The message of the exception, providing details about the error that occurred.
-