public class IntrusionException extends EnterpriseSecurityRuntimeException
Unlike other exceptions in the ESAPI, the IntrusionException is a RuntimeException so that it can be thrown from anywhere and will not require a lot of special exception handling.
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
The logger.
|
protected String |
logMessage |
Constructor and Description |
---|
IntrusionException(String userMessage,
String logMessage)
Creates a new instance of IntrusionException.
|
IntrusionException(String userMessage,
String logMessage,
Throwable cause)
Instantiates a new intrusion exception.
|
Modifier and Type | Method and Description |
---|---|
String |
getLogMessage()
Returns a String that is safe to display in logs, but probably not to users
|
String |
getUserMessage()
Returns a String containing a message that is safe to display to users
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
protected final transient Logger logger
protected String logMessage
public IntrusionException(String userMessage, String logMessage)
userMessage
- the message to display to userslogMessage
- the message loggedpublic String getUserMessage()
getUserMessage
in class EnterpriseSecurityRuntimeException
public String getLogMessage()
getLogMessage
in class EnterpriseSecurityRuntimeException
Copyright © 2023 The Open Web Application Security Project (OWASP). All rights reserved.