Package io.github.pasinduog.exception
Class ApiException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.github.pasinduog.exception.ApiException
- All Implemented Interfaces:
Serializable
Base abstract exception class for API-related exceptions.
This class provides a foundation for creating custom business logic exceptions with associated HTTP status codes. Extend this class to create specific exception types for your application.
- Since:
- 1.0.0
- Version:
- 2.0.0
- Author:
- Pasindu OG
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.HttpStatusGets the HTTP status code associated with this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getStatus
public org.springframework.http.HttpStatus getStatus()Gets the HTTP status code associated with this exception.- Returns:
- the HTTP status
-