Class ApiRuntimeException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.karafra.bitchutedl.exceptions.ApiRuntimeException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ArgumentRequiredException,FileDownloadException,NotValidLinkException,WrongXPathException
public class ApiRuntimeException extends RuntimeException
Base class for api exceptions.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Karafra
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ApiRuntimeException()Default empty constructor, will return response code 400.ApiRuntimeException(String message)Default string only constructor, will return response code 400.ApiRuntimeException(String message, Throwable cause)Constructor used when message and cause is provided.ApiRuntimeException(String message, Throwable cause, org.springframework.http.HttpStatus status)Constructor used when message and cause is provided.ApiRuntimeException(String message, org.springframework.http.HttpStatus status)Constructor used when message and status is provided.ApiRuntimeException(Throwable cause)Constructor used when only cause is provided.ApiRuntimeException(Throwable cause, org.springframework.http.HttpStatus status)Constructor used when cause and status is provided.ApiRuntimeException(org.springframework.http.HttpStatus status)Constructor used when status code is provided.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ApiRuntimeException
public ApiRuntimeException()
Default empty constructor, will return response code 400. Status code will be400.
-
ApiRuntimeException
public ApiRuntimeException(org.springframework.http.HttpStatus status)
Constructor used when status code is provided.- Parameters:
status- status code to be returned.
-
ApiRuntimeException
public ApiRuntimeException(String message)
Default string only constructor, will return response code 400. Status code will be400.- Parameters:
message- simple string describing exception.
-
ApiRuntimeException
public ApiRuntimeException(String message, org.springframework.http.HttpStatus status)
Constructor used when message and status is provided.- Parameters:
message- description of exception.status- status to be returned.
-
ApiRuntimeException
public ApiRuntimeException(String message, Throwable cause)
Constructor used when message and cause is provided. Status code will be400.- Parameters:
message- description of exception.cause- case of exception.
-
ApiRuntimeException
public ApiRuntimeException(String message, Throwable cause, org.springframework.http.HttpStatus status)
Constructor used when message and cause is provided.- Parameters:
message- description of exception.cause- case of exception.status- status to be returned.
-
ApiRuntimeException
public ApiRuntimeException(Throwable cause)
Constructor used when only cause is provided. Status code will be400.- Parameters:
cause- cause of exception.
-
ApiRuntimeException
public ApiRuntimeException(Throwable cause, org.springframework.http.HttpStatus status)
Constructor used when cause and status is provided.- Parameters:
cause- cause of error.status- status code to be returned.
-
-