Recent Posts
Recent Comments
- python – Testing email sending-ThrowExceptions – ThrowExceptions on PostHoc: Testing Apps that Send Email
- The Silent Enemy: Failure to Report Exceptions | Thinking Matters on The Purpose of Error Reporting
- Colin James III (The Most Rev'd, Ret.) on Not-So-EasyChair Hints
- gizmos and gadgets on The Only Class You Need for CSV Files
- kswenson on The Only Class You Need for CSV Files
Archives
- May 2021
- April 2021
- February 2021
- December 2020
- April 2020
- February 2020
- November 2019
- October 2019
- June 2019
- May 2019
- February 2019
- January 2019
- November 2018
- June 2018
- May 2018
- April 2018
- February 2018
- January 2018
- December 2017
- November 2017
- July 2017
- June 2017
- May 2017
- March 2017
- January 2017
- June 2016
- March 2016
- February 2016
- December 2015
- November 2015
- October 2015
- September 2015
- August 2015
- June 2015
- April 2015
- January 2015
- November 2014
- October 2014
- September 2014
- July 2014
- May 2014
- April 2014
- February 2014
- January 2014
- October 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
Meta
Author Archives: keith swenson
Java TimerTask Implementation Pattern
When implementing a TimerTask class, there are a couple of things to remember.
Posted in Uncategorized Leave a comment
Simple Rule for Exception
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 … Continue reading
Posted in Uncategorized Leave a comment
Poor Exception Handling Examples
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 … Continue reading
Posted in Uncategorized Leave a comment
Ultimate Java Exception Class
This is the third in a series about translatable exceptions (see Translatable Error Messages). This post is about the class JSONException which contains the required features.
Posted in Coding, Design, Uncategorized Tagged errors, exceptions, internationalization, JSON Leave a comment
Exception Receiving
When you make a web service call, you want to report the problem to the user save as you do for any other part of the program, and that is through an exception object. This post talks about converting the … Continue reading
Variable Arguments for Messages
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 … Continue reading
Posted in Coding, Design, Uncategorized Tagged errors, exceptions, internationalization, syntax 1 Comment
JSON Translatable Error Messages
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.
Translatable Error Messages
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 … Continue reading
Constants and Errors
Still reviewing that code base and finding more bad patterns for use of constants, this time for error messages. This is another “don’t do this” post.
Posted in Coding, practice, Uncategorized Tagged code style, errors, exceptions, programming Leave a comment
Constant Abuse 2
Some programmers believe that constants are the source of all goodness, because it means in the future that everything will be malliable. Particularly programmers paid by the hour. This is a mistake. Readibility suffers if constants are abused. I am … Continue reading