|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectErrorHandling
public class ErrorHandling
Constructor Summary | |
---|---|
ErrorHandling()
|
Method Summary | |
---|---|
String |
getErrorsReport(String tagName)
This method will return a String |
String |
getInlineError(String tagName)
|
boolean |
hasErrors()
This method will return true if there have been any errors registered on this
tag. |
void |
registerTagError(AbstractPageError error,
JspTag tag)
This method will add an error to the errors begin tracked by the tag. |
void |
registerTagError(String message,
String tagName,
JspTag tag,
Throwable e)
This will report an error from a tag. |
static void |
reportCollectedErrors(InternalStringBuilder sb,
JspTag tag)
This method get the current errors and write the formated output |
static void |
reportCollectedErrors(PageContext pc,
JspTag tag)
This method get the current errors and write the formated output |
void |
reportErrors(Writer writer,
String tagName)
This method will write out the String returned by getErrorsReport to the
response output stream. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErrorHandling()
Method Detail |
---|
public void registerTagError(String message, String tagName, JspTag tag, Throwable e) throws JspException
message
- - the message to register with the error
JspException
- - if in-page error reporting is turned off this method will always
throw a JspException.public void registerTagError(AbstractPageError error, JspTag tag) throws JspException
hasErrors
will return true.
error
- The EvalErrorInfo
describing the error.
JspException
public boolean hasErrors()
true
if there have been any errors registered on this
tag. Otherwise it returns false
true
if errors have been reported on this tag.registerTagError(java.lang.String, java.lang.String, javax.servlet.jsp.tagext.JspTag, java.lang.Throwable)
public void reportErrors(Writer writer, String tagName) throws JspException
String
returned by getErrorsReport
to the
response output stream.
JspException
- if write
throws an exception.getErrorsReport(java.lang.String)
public String getInlineError(String tagName)
public String getErrorsReport(String tagName)
String that represents all of the errors that were
registered for the tag. This method assumes that there are errors in the tag and asserts
this is true. Code will typically call hasErrors
before calling this method.
- Returns:
- A
String
that contains all of the errors registered on this tag. - See Also:
registerTagError(java.lang.String, java.lang.String, javax.servlet.jsp.tagext.JspTag, java.lang.Throwable)
public static void reportCollectedErrors(InternalStringBuilder sb, JspTag tag)
sb
- public static void reportCollectedErrors(PageContext pc, JspTag tag)
pc
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |