org.mmbase.util
Class ErrorStruct

java.lang.Object
  extended by org.mmbase.util.ErrorStruct

public class ErrorStruct
extends Object

Class for storing error information useful in parsing. Information that can be stored includes the error type, column and line number of the parsed text where the error occurred, and a message. used by the org.mmbase.module.Config module when parsing XML files.

Version:
$Id: ErrorStruct.java 35335 2009-05-21 08:14:41Z michiel $
Author:
vpro
Application:
Config

Field Summary
(package private)  int col
           
(package private)  String errorType
           
(package private)  int line
           
(package private)  String msg
           
 
Constructor Summary
ErrorStruct(int line, int col, String msg)
          Creates an error structure, with errortype "none".
ErrorStruct(String errorType, int line, int col, String msg)
          Creates an error structure.
 
Method Summary
 int getColumnNumber()
          Returns the column number in the parsed source (file or textbuffer) where the error occurred.
 String getErrorType()
          Returns the error type.
 int getLineNumber()
          Returns the line number in the parsed source (file or textbuffer) where the error occurred.
 String getMessage()
          Returns a more detailed error message.
 String toString()
          prints the ErrorStruct
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

errorType

String errorType

line

int line

col

int col

msg

String msg
Constructor Detail

ErrorStruct

public ErrorStruct(int line,
                   int col,
                   String msg)
Creates an error structure, with errortype "none".

Parameters:
line - the line number where the error occurred
col - the column number where the error occurred
msg - the error message

ErrorStruct

public ErrorStruct(String errorType,
                   int line,
                   int col,
                   String msg)
Creates an error structure.

Parameters:
errorType - the type of error,
line - the line number where the error occurred
col - the column number where the error occurred
msg - the error message
Method Detail

getErrorType

public String getErrorType()
Returns the error type. Values that might be expected are "warning", "error" and "fatal".


getLineNumber

public int getLineNumber()
Returns the line number in the parsed source (file or textbuffer) where the error occurred.


getColumnNumber

public int getColumnNumber()
Returns the column number in the parsed source (file or textbuffer) where the error occurred.


getMessage

public String getMessage()
Returns a more detailed error message.


toString

public String toString()
prints the ErrorStruct

Overrides:
toString in class Object


MMBase 2.0-SNAPSHOT - null