Discussing this you should be aware JDK1.4 as released about 10 years ago. It invented exception chaining wich simply means you have a contructor that takes a cause exception. And then a nice compound stack trace for all that stuff is printed. Before JDK1.4 many such implementations had existed in the JDK and those have been unifued to a single consistent solution. Now what commons lang did was to provide some simlar base classes to get this idea to older JDKs. However since the many things happened:
- JDK 1.3 public maintainace period ended
- JDK 1.4 public maintainace period ended
- JDK 5 public maintainace period ended
- and now JDK 6 public maintainace period is about to end.
So simply no one is interessted in 'prior JDK 1.4' versions any more.
Now on the other hand this exception with context thing has nothing to do with any JDK version. It's again base classes for exceptions, but it has a Map in which to put things. Normally this is implemented by special exception types having additional fields. This is type safe, nice and clean. Having a map on every exception, means never knowing what will be in this map. I can't think of any benefit this provides. So, if you do not have a really great plan to use it, I wouldn't recommend it.