org.apache.xerces.impl.dv

Class DatatypeException

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.

INTERNAL:

Usage of this class is not supported. It may be altered or removed at any time.

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 Stringkey
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
StringgetKey()
Return the error code
StringgetMessage()
Overrides this method to get the formatted&localized error message.

Field Detail

args

protected Object[] args

key

protected String key

Constructor Detail

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 Detail

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.