org.makumba
Class DefinitionParseError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by org.makumba.MakumbaError
              extended by org.makumba.DefinitionParseError
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DataDefinitionParseError, ValidationDefinitionParseError

public abstract class DefinitionParseError
extends MakumbaError

This class provides basic support for definition parse errors.

Version:
$Id: DefinitionParseError.java 3821 2009-05-09 10:27:37Z manuel_gay $
Author:
Rudolf Mayer
See Also:
Serialized Form

Field Summary
protected  int column
           
protected  Vector<DefinitionParseError> components
           
protected  String line
           
protected  Hashtable<String,DefinitionParseError> lines
           
protected  String typeName
           
 
Constructor Summary
DefinitionParseError()
           
DefinitionParseError(String explanation)
           
DefinitionParseError(String typeName, String reason, String line)
          Construct a message for a line
DefinitionParseError(Throwable reason)
           
DefinitionParseError(Throwable reason, String expl)
           
 
Method Summary
 void add(DefinitionParseError e)
          add another error to the main error
 String getMessage()
          If the error is single, call the default action, else compose all components' messages
 String getTypeName()
          return the type for which the error occured
 boolean isSingle()
          tells whether this error is empty or contains sub-errors
static StringBuffer pointError(int column)
          put a marker for a given column
protected static String showTypeName(String typeName)
           
 
Methods inherited from class org.makumba.MakumbaError
printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

column

protected int column

components

protected Vector<DefinitionParseError> components

line

protected String line

lines

protected Hashtable<String,DefinitionParseError> lines

typeName

protected String typeName
Constructor Detail

DefinitionParseError

public DefinitionParseError()

DefinitionParseError

public DefinitionParseError(String typeName,
                            String reason,
                            String line)
Construct a message for a line


DefinitionParseError

public DefinitionParseError(String explanation)

DefinitionParseError

public DefinitionParseError(Throwable reason)

DefinitionParseError

public DefinitionParseError(Throwable reason,
                            String expl)
Method Detail

pointError

public static StringBuffer pointError(int column)
put a marker for a given column


showTypeName

protected static String showTypeName(String typeName)

add

public void add(DefinitionParseError e)
add another error to the main error


getMessage

public String getMessage()
If the error is single, call the default action, else compose all components' messages

Overrides:
getMessage in class Throwable

isSingle

public boolean isSingle()
tells whether this error is empty or contains sub-errors


getTypeName

public String getTypeName()
return the type for which the error occured