Re: Util.unwindException()

From: Gili (cowwo..bs.darktech.org)
Date: Fri Sep 09 2005 - 01:01:41 EDT

  • Next message: Andrus Adamchik: "Re: Linking two unregistered CayenneDataObjects"

            Moved to the devel list. Please let me know if you are for or against
    these kinds of patches, for clarifying the error messages.

            I've set up a catch block in QualifierTranslator.appendLiteral() such
    that when this failure occurs, we can output the expression being
    evaluated so it'll give the user a clue as to which parameter is at
    fault. I'm still not satisfied with the result though because
    Expression.toString() is hard to read.

            Is there a way for us to trace a DataObject operand in an Expression
    back to the parameter name it was bound to or is this impossible? Is
    there another level we could catch this exception at that *would* let us
    know the name of the parameter that triggered the exception?

    Thank you,
    Gili

    Gili wrote:
    > Hi,
    >
    > I'm trying to improve errors reporting in Cayenne. When a query
    > fails because one of its parameters is NEW, I'd like to inform the user
    > *which* parameter was at fault. The problem is that SelectQuery uses
    > Util.unwindException() and so any extra exception level I add gets
    > stripped away. Ideally, I don't want to discard the lower-level
    > exception because it is useful to know not only what DataObject was at
    > fault, but what it was wrong too. In other words, I want to keep *all*
    > the exceptions. Would it be reasonable to remove or enhance
    > unwindException() somehow?
    >
    > Gili

    -- 
    http://www.desktopbeautifier.com/
    



    This archive was generated by hypermail 2.0.0 : Fri Sep 09 2005 - 01:01:42 EDT