0 Replies Latest reply on Jan 24, 2006 4:18 AM by J-C jc

    Usage of chained exception

    J-C jc Apprentice

      I am used to chain exceptions on server side. It makes the debug much easier.
      With my design some application exception may contains chain references to technical exception. When this exception are thrown, as it is application exception they are thrown to the client. Client does not contain in its classpath chained technical exceptions. Consequently on client side, I have a ClassNotFoundException and on server side I have no traces.

      My problem is to know how to continue to chain exception and server side and before sending exception to the client, just remove chained exception, log on the server side and set in the excpetion thrown to the client a reference (a timestanp for example) to be able to find the exception in server logs.

      Do it exists pattern, good practice for that kinds of thinks ?

      Do you have other ideas to manage such chained exception and continue to have clear exception on client ?