Package net.jini.config
Class ConfigurationFile.ErrorDescriptor
java.lang.Object
net.jini.config.ConfigurationFile.ErrorDescriptor
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ConfigurationFile
Class used to represent a syntax error encountered when parsing a configuration source or a
problem encountered when attempting to return an existing entry or the type of an existing
entry.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionErrorDescriptor(int lineno, int override, String description) Creates a new error descriptor.ErrorDescriptor(int lineno, int override, String description, String locationName) Creates a new error descriptor.ErrorDescriptor(int lineno, int override, String description, String locationName, Throwable t) Creates a new error descriptor. -
Method Summary
Modifier and TypeMethodDescriptiongetCause()Returns the exception associated with this error ornullif there is no exception associated with this error.Returns a textual description of the error encountered.intReturns the line number in the configuration source where the entry with an error can be found or0if this error descriptor is not associated with a line number.Returns the name of the configuration source location ornullif location information is not available.intReturns the override sequence number where this error occurred or0if the error did not occur in an override.toString()Returns a string representation of this error.
-
Constructor Details
-
ErrorDescriptor
public ErrorDescriptor(int lineno, int override, String description, String locationName, Throwable t) Creates a new error descriptor.- Parameters:
lineno- line number of the configuration source where this problem was found or0if this problem is not associated with a line numberoverride- the override sequence number or0if the problem was not found in an overridedescription- a description of the problem; this parameter cannot benulllocationName- the name of the configuration source location ornullif location information is not availablet- exception associated with this error ornullif there is no exception related to the error;tcannot be an instance ofjava.lang.Error- Throws:
IllegalArgumentException- iflineno<0,override<0,descriptionisnull, ortis an instance ofjava.lang.Error
-
ErrorDescriptor
Creates a new error descriptor.- Parameters:
lineno- line number of the configuration source where this problem was found or0if this problem is not associated with a line numberoverride- the override sequence number or0if the problem was not found in an overridedescription- a description of the problem; this parameter cannot benulllocationName- the name of the configuration source location ornullif location information is not available- Throws:
IllegalArgumentException- iflineno<0,override<0, ordescriptionisnull
-
ErrorDescriptor
Creates a new error descriptor.- Parameters:
lineno- line number of the configuration source where this problem was found or0if this problem is not associated with a line numberoverride- the override sequence number or0if the problem was not found in an overridedescription- a description of the problem; this parameter cannot benull- Throws:
IllegalArgumentException- iflineno<0,override<0, ordescriptionisnull
-
-
Method Details
-
getLineNumber
public int getLineNumber()Returns the line number in the configuration source where the entry with an error can be found or0if this error descriptor is not associated with a line number.- Returns:
- the line number in the configuration source where the entry with an error can be
found or
0if this error descriptor is not associated with a line number
-
getOverride
public int getOverride()Returns the override sequence number where this error occurred or0if the error did not occur in an override. For example, if the error occurred in the second override specified, the method would return2.- Returns:
- the override where this error occurred or
0if this error did not occur in an override
-
getDescription
Returns a textual description of the error encountered.- Returns:
- a description of the problem
-
getLocationName
Returns the name of the configuration source location ornullif location information is not available.- Returns:
- the name of the configuration source location where this error occurred or
nullif location information is not available.
-
getCause
Returns the exception associated with this error ornullif there is no exception associated with this error.- Returns:
- the exception associated with this error or null if there is no exception associated with this error.
-
toString
Returns a string representation of this error.
-