2 Replies Latest reply: Aug 31, 2009 1:37 AM by 843810 RSS

    How to internationalize exception messages?

    843810
      I want to internationalize exception message in this way:
      public myException extends Exception
      {
      myException(message)
      {
      ResourceBundle bundle=ResourceBundle.getBundle("properties.properties",currentlocale);
      String exceptionmessage=bundle.getString(message);
      super(exceptionmessage);
      }
      }
      but the superclass's constructor must be the first statement.

      So, how to internationalize exception messages?