-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
4.5.0
-
None
In JBossTM exceptions are often catched and left behind in favor of a new dedicated Exception (or Error) contextually thrown.
This lead to a steady lack of information about the origin of the final symptom.
As an example, see the following code snippet (extracted from com.arjuna.ats.internal.arjuna.objectstore.JDBCStore.JDBCStore())
...
try
catch (Exception e)
{ throw new ObjectStoreError(); }...
Here the original exception "e" is lost in favor of a new ObjectStoreError. No one will never know the cause of the thrown ObjectStoreError, nor see what's wrong without using a debugger (if ever available).
Since I saw the binary distribution of JBossTM (at least version 4.5.0) is compiled for Java 1.5, I suppose you aren't denied to use the standard exception chaining mechanism introduced since Java 1.4 (namely the java.lang.Throwable.cause field)
Please consider refactoring your code to chain the exception causes. It would be very useful.
- duplicates
-
JBTM-86 Exception chaining
- Closed