Package jmri

Class NamedBean.BadSystemNameException

    • Constructor Summary

      Constructors 
      Constructor Description
      BadSystemNameException()
      Create an exception with no message to the user or for logging.
      BadSystemNameException​(java.lang.String logging, java.lang.String display)
      Create a localized exception, suitable for display to the user.
      BadSystemNameException​(java.util.Locale locale, java.lang.String message, java.lang.Object... subs)
      Create a localized exception, suitable for display to the user.
    • Method Summary

      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BadSystemNameException

        public BadSystemNameException()
        Create an exception with no message to the user or for logging. Use only when calling methods likely have alternate mechanism for allowing user to understand why exception was thrown.
      • BadSystemNameException

        public BadSystemNameException​(java.lang.String logging,
                                      java.lang.String display)
        Create a localized exception, suitable for display to the user. This takes the non-localized message followed by the localized message.

        Use NamedBean.BadNameException.getLocalizedMessage() to display the message to the user, and use Throwable.getMessage() to record the message in logs.

        Parameters:
        logging - the English message for logging
        display - the localized message for display