• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The choice of extracting commonly used error messages into a utility class. Is this advisable?

 
Yucca Nel
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In short i want to know if extracting a message like "an IO exception occured" and putting it into an utility class is advisable?
Even though the exception is common to several places it is not really going to improve performance because it is after al an exceptional condition which should rarely occur.

Another question is i see Andrew went the route of taking all the Strings in config.java and declared them at the beginning of the class stating that it allowed for i8n of the Strings. I wish to use i8n in my application but am unsure on how much I should allow to be i8n? Should I code all button,error,label,title,etc texts in a way that they can be internationalized?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic