• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 147
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic