Re: Classification failed

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jun 24 2003 - 17:37:50 EDT

  • Next message: Holger Hoffstätte: "Re: Firebird Adaptor"

    Jean,

    I agree in general that diagnostics of the *real* underlying error is
    sometimes misleading, with Cayenne trying to guess the answer without
    having sufficient context information in the spot where it happens. The
    general development direction is moving to more verbose error messages
    providing the values of relevant variables, etc.

    > It seems, also, that the actual SQLExceptions never
    > show up, being swallawed by the useless CayenneRuntimeException.

    But there is something that can be done to analyze the execption right
    now, and take advantage of the stack trace. All Cayenne exceptions have an
    underlying "cause" saved (this is standard Java feature starting from 1.4,
    but we provide this independent from JVM:

      Throwable th = exception.getCause();

    There is also a utility method to "unwind" the real cause for underlying
    chain of exceptions (both Cayenne exceptions and java reflection exception
    wrappers):

      Throwable th =
    org.objectstyle.cayenne.util.Util.unwindException(exception);

    We may need to add the call to unwind.. from within "printStackTrace()" I
    guess, but you can do it manually now.

    > Finally I want to add that I appreciate very much your quick
    > answers to the questions posted on the list.

    As I do appreciate informative posts from the users have a product view
    from a totally different angle than mine :-)

    A.



    This archive was generated by hypermail 2.0.0 : Tue Jun 24 2003 - 17:37:50 EDT