When implementing a TimerTask class, there are a couple of things to remember. Read the rest of this entry »
Category Archives: Uncategorized
If you want a program that runs reliably, then there is a simple rule to follow about exception handling. It is so simple, it can be stated in a single sentence: if a method does not accomplish what it is supposed to do, it must throw an exception. Read the rest of this entry »
Having just written about JSON error messages and exceptions, I did a small survey to see what others were doing, and I saw some of the most egregious examples of poor coding. Sloppy exception handling makes programs that behave bad when the network runs into problems, and causes no end of suffering. Here are some poor examples and why they are bad. Read the rest of this entry »
We need to construct an object which has a template and a set of parameter data values. Java offers a couple of ways to do this, and this post shows how the variable parameter mechanism works easily and conveniently for this purpose. Read the rest of this entry »
Second in a series on translatable exceptions, this discusses how an error message should be returned as JSON from a web-service API so that it the calling program can display the error in the right language for the user. Read the rest of this entry »
This is the first of a series of posts, I want to go over some of the groundwork of what it takes to make exceptions localizable into other languages. Nothing new here, but just want to explain clearly the requirements of a localizable exception messages.