Package jmri
Class NamedBean.BadNameException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
jmri.NamedBean.BadNameException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NamedBean.BadSystemNameException
,NamedBean.BadUserNameException
- Enclosing interface:
- NamedBean
public static class NamedBean.BadNameException extends IllegalArgumentException
Parent class for a set of classes that describe if a user name or system
name is a bad name.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Modifier Constructor Description protected
BadNameException()
Create an exception with no message to the user or for logging.protected
BadNameException(String logging, String display)
Create a localized exception, suitable for display to the user.This takes the non-localized message followed by the localized message. -
Method Summary
Modifier and Type Method Description String
getLocalizedMessage()
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
BadNameException
protected BadNameException()Create an exception with no message to the user or for logging. -
BadNameException
Create a localized exception, suitable for display to the user.This takes the non-localized message followed by the localized message.Use
getLocalizedMessage()
to display the message to the user, and useThrowable.getMessage()
to record the message in logs.- Parameters:
logging
- the English message for loggingdisplay
- the localized message for display
-
-
Method Details
-
getLocalizedMessage
- Overrides:
getLocalizedMessage
in classThrowable
-