Class L10NMessageImpl

    • Constructor Detail

      • L10NMessageImpl

        public L10NMessageImpl​(String msg)
      • L10NMessageImpl

        public L10NMessageImpl​(String message,
                               Throwable cause)
      • L10NMessageImpl

        public L10NMessageImpl​(String rbName,
                               String errorCode,
                               Object[] args)
        This constructor is used to pass the localized error message At this level, the locale of the caller is not known and it is not possible to throw localized error message at this level. Instead this constructor provides Resource Bundle name and errorCode for correctly locating the error messsage. The default getMessage() will always return English messages only. This is in consistent with current JRE
        Parameters:
        rbName - ResourceBundle Name to be used for getting localized error message.
        errorCode - Key to resource bundle. You can use
                ResourceBundle rb = ResourceBunde.getBundle(rbName, locale);
                String localizedStr = rb.getString(errorCode);
                
        args - Arguments to message. If it is not present pass the as null.
      • L10NMessageImpl

        public L10NMessageImpl​(Throwable ex)
        This constructor is used to extract localized error message from throwable.
        Parameters:
        ex - if the exception message is instance of L10NMessage, the bundleName,errorCode and args are extracted from throwable