|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException org.owasp.esapi.errors.IntrusionException
public class IntrusionException
An IntrusionException should be thrown anytime an error condition arises that is likely to be the result of an attack in progress. IntrusionExceptions are handled specially by the IntrusionDetector, which is equipped to respond by either specially logging the event, logging out the current user, or invalidating the current user's account.
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.
Field Summary | |
---|---|
protected Logger |
logger
The logger. |
protected String |
logMessage
|
Constructor Summary | |
---|---|
IntrusionException(String userMessage,
String logMessage)
Creates a new instance of IntrusionException. |
|
IntrusionException(String userMessage,
String logMessage,
Throwable cause)
Instantiates a new intrusion exception. |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final transient Logger logger
protected String logMessage
Constructor Detail |
---|
public IntrusionException(String userMessage, String logMessage)
userMessage
- the message to display to userslogMessage
- the message loggedpublic IntrusionException(String userMessage, String logMessage, Throwable cause)
userMessage
- the message to display to userslogMessage
- the message loggedcause
- the causeMethod Detail |
---|
public String getUserMessage()
public String getLogMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |