public class ErrorList extends Object
ErrorList
class maintains a list of all Exceptions or error
messages that are set by another functional class. Besides this, it also logs them to the supplied
Logger
instance.Constructor and Description |
---|
ErrorList()
Creates a new ErrorList.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getLastError()
This method will indicate if the last call to a Presentation Function in
this class resulted in an error, and will retrieve information about
this error.
|
String |
getLastErrorMessage()
This method will return the last error message, stored after the first
call to
setError() after the last call to
resetLastError() , or stored after the first call to
setError() after the creation
of this object. |
String |
getLastStackTrace()
This method will return the stacktrace of the last Exception, which was
stored after the first call to
setError() after the last
call to resetLastError() , or the first call to this method
after the creation of this object. |
void |
resetLastError()
This method will reset the error information in this object.
|
void |
setError(Exception e)
Stores information on this exception in this object, if after the
last call to
resetLastError() no other error is set. |
void |
setError(String errorMessage)
Stores information about an error situation, if after the
last call to
resetLastError() no other error is set. |
void |
setError(String message,
Exception e)
Stores information on this exception in this object, if after the
last call to
resetLastError() no other error is set. |
public ErrorList()
public void setError(Exception e)
resetLastError()
no other error is set.e
- the exception to store this information about.public void setError(String message, Exception e)
resetLastError()
no other error is set.message
- The message for the exception to be set.e
- The exception to store this information about.public void setError(String errorMessage)
resetLastError()
no other error is set.errorMessage
- the message that should be set.public void resetLastError()
public boolean getLastError()
true
if the last call to one of the methods
resulted in an error/exception and false
if not.public String getLastErrorMessage()
setError()
after the last call to
resetLastError()
, or stored after the first call to
setError()
after the creation
of this object. The method getLastError()
can be called to
check if an error occurred.public String getLastStackTrace()
setError()
after the last
call to resetLastError()
, or the first call to this method
after the creation of this object. The method
getLastError()
can be called to check if an error occurred.Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries