oracle.cabo.share.xml
Class ParseErrorUtils
java.lang.Object
|
+--oracle.cabo.share.xml.ParseErrorUtils
- public class ParseErrorUtils
- extends java.lang.Object
Error reporting utilities. Many of these utility methods are available in even more convenient form on BaseNodeParser and BaseParserExtension.
- See Also:
BaseNodeParser.getRequiredAttribute(oracle.cabo.share.xml.ParseContext, org.xml.sax.Attributes, java.lang.String)
, BaseNodeParser.logWarning(oracle.cabo.share.xml.ParseContext, java.lang.String)
, BaseNodeParser.logError(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.Exception)
, BaseNodeParser.logUnexpectedElement(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.String)
, BaseParserExtension.logWarning(oracle.cabo.share.xml.ParseContext, java.lang.String)
, BaseParserExtension.logError(oracle.cabo.share.xml.ParseContext, java.lang.String, java.lang.Exception)
Method Summary |
static java.lang.String |
getErrorMessage(ParseContext context, java.lang.String message)
Creates an error message that will include line number, column number, and other information from the parsing context. |
static void |
log(ParseContext context, java.lang.String message, java.lang.Exception e, int verbosity)
Sends a message to the error log, automatically pulling line and column information from the context |
static void |
log(ParseContext context, java.lang.String message, java.lang.Exception e, int line, int column, java.lang.String systemId, int verbosity)
Sends a message to the error log, including full line and column information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ParseErrorUtils
public ParseErrorUtils()
log
public static void log(ParseContext context,
java.lang.String message,
java.lang.Exception e,
int verbosity)
- Sends a message to the error log, automatically pulling line and column information from the context
-
- Parameters:
context
- the parsing context
message
- the string message, if any
e
- the associated exception, if any
verbosity
- the verbosity level of the problem
log
public static void log(ParseContext context,
java.lang.String message,
java.lang.Exception e,
int line,
int column,
java.lang.String systemId,
int verbosity)
- Sends a message to the error log, including full line and column information.
-
- Parameters:
context
- the parsing context
message
- the string message, if any
e
- the associated exception, if any
line
- the line number
column
- the column number
verbosity
- the verbosity level of the problem
getErrorMessage
public static java.lang.String getErrorMessage(ParseContext context,
java.lang.String message)
- Creates an error message that will include line number, column number, and other information from the parsing context.
-
- Parameters:
context
- the parsing context
message
- a base message