Package org.omegazero.http.common
Class InvalidHTTPMessageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.omegazero.http.common.HTTPException
org.omegazero.http.common.InvalidHTTPMessageException
- All Implemented Interfaces:
Serializable
An exception thrown when a malformed or otherwise invalid
HTTPMessage
is encountered.- Since:
- 1.2.1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newInvalidHTTPMessageException
with no detail message.Creates a newInvalidHTTPMessageException
with the given detail message.InvalidHTTPMessageException
(String msg, boolean msgUserVisible) Creates a newInvalidHTTPMessageException
with the given detail message.InvalidHTTPMessageException
(String msg, Throwable cause) Creates a newInvalidHTTPMessageException
with the given detail message and cause.InvalidHTTPMessageException
(String msg, Throwable cause, boolean msgUserVisible) Creates a newInvalidHTTPMessageException
with the given detail message and cause. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether the message of thisThrowable
may be shown to external parties, for example in a400 Bad Request
response body.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
InvalidHTTPMessageException
public InvalidHTTPMessageException()Creates a newInvalidHTTPMessageException
with no detail message. -
InvalidHTTPMessageException
Creates a newInvalidHTTPMessageException
with the given detail message.- Parameters:
msg
- The detail message
-
InvalidHTTPMessageException
Creates a newInvalidHTTPMessageException
with the given detail message.- Parameters:
msg
- The detail messagemsgUserVisible
- Whether the given msg may be shown to external parties
-
InvalidHTTPMessageException
Creates a newInvalidHTTPMessageException
with the given detail message and cause.- Parameters:
msg
- The detail messagecause
- The cause
-
InvalidHTTPMessageException
Creates a newInvalidHTTPMessageException
with the given detail message and cause.- Parameters:
msg
- The detail messagecause
- The causemsgUserVisible
- Whether the given msg may be shown to external parties
-
-
Method Details
-
isMsgUserVisible
public boolean isMsgUserVisible()Returns whether the message of thisThrowable
may be shown to external parties, for example in a400 Bad Request
response body.- Returns:
true
if the exception message may be shown to external parties
-