com.unitesk.atp.dynattrs
Class AttributePathException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.unitesk.atp.dynattrs.AttributePathException
- All Implemented Interfaces:
- Serializable
public class AttributePathException
- extends RuntimeException
This exception reports about various problems while getting attribute value by attribute path:
syntax errors in attribute path, wrong attribute names etc.
Exception provides information about object and attribute.
A cause of exception contains additional information.
- Version:
- $Id: AttributePathException.java,v 1.2 2004/10/11 15:00:41 all-x Exp $
- Author:
- Alexey Demakov
- See Also:
Accessor.getAttribute( Object,String,Attributed)
,
Serialized Form
NO_CLOSING_BRACKET
public static final int NO_CLOSING_BRACKET
- No closing bracket for open bracket at position
pos
.
The cause is null.
- See Also:
- Constant Field Values
INDEX_VALUE
public static final int INDEX_VALUE
- Problem with index value - it is not integer.
The cause is
ClassCastException
(index variable has not Integer
value)
or NumberFormatException
(index expression is not valid integer).
- See Also:
- Constant Field Values
ATTRIBUTED_EXCEPTION
public static final int ATTRIBUTED_EXCEPTION
- Various problems with attributes. Wrong name etc.
Position of attribute name is in
pos
, the cause is underlying
AttributeException
.
Note that index variables are attributes of variableMap, so they also can be causes of
AttributeException
.
- See Also:
- Constant Field Values
kind
protected int kind
obj
protected Object obj
path
protected String path
pos
protected int pos
AttributePathException
public AttributePathException(int kind,
Object obj,
String path,
int pos,
Throwable cause)
- Creates an exception with the specified parameters.
- Parameters:
kind
- Error kind one of {link #NO_CLOSING_BRACKET}, {link #INDEX_VALUE},
{link #ATTRIBUTED_EXCEPTION}.obj
- Attributed object.path
- Attribute path.pos
- Error position (starting from 0).cause
- Cause of this exception.
getMessage
public String getMessage()
- Overrides:
getMessage
in class Throwable
getKind
public int getKind()
- Returns:
- Error kind.
getKindString
public String getKindString()
getObject
public Object getObject()
- Returns:
- Attributed object.
getPath
public String getPath()
- Returns:
- Attribute path.
getPos
public int getPos()
- Returns:
- Error position in path.
Copyright © 2001-2006 ISP RAS, RedVerst Group. All Rights Reserved.