org.apache.xerces.impl.dv

Class DatatypeException

Known Direct Subclasses:
InvalidDatatypeFacetException, InvalidDatatypeValueException

public class DatatypeException
extends Exception

Base class for datatype exceptions. For DTD types, the exception can be created from an error message. For Schema types, it needs an error code (as defined in Appendix C of the structure spec), plus an array of arguents, for error message substitution.
Version:
$Id: DatatypeException.java,v 1.7 2004/10/06 14:56:50 mrglavas Exp $
Author:
Sandy Gao, IBM

Field Summary

protected Object[]
args
protected String
key

Constructor Summary

DatatypeException(String key, Object[] args)
Create a new datatype exception by providing an error code and a list of error message substitution arguments.

Method Summary

Object[]
getArgs()
Return the list of error arguments
String
getKey()
Return the error code
String
getMessage()
Overrides this method to get the formatted&localized error message.

Field Details

args

protected Object[] args

key

protected String key

Constructor Details

DatatypeException

public DatatypeException(String key,
                         Object[] args)
Create a new datatype exception by providing an error code and a list of error message substitution arguments.
Parameters:
key - error code
args - error arguments

Method Details

getArgs

public Object[] getArgs()
Return the list of error arguments
Returns:
error arguments

getKey

public String getKey()
Return the error code
Returns:
error code

getMessage

public String getMessage()
Overrides this method to get the formatted&localized error message. REVISIT: the system locale is used to load the property file. do we want to allow the appilcation to specify a different locale?

Copyright B) 1999-2005 Apache XML Project. All Rights Reserved.