Re: subclass of CayenneRuntimeException for => PersistenceState.TRANSIENT under 1.1RC1

From: Mike Kienenberger (mkienen..laska.net)
Date: Tue Oct 19 2004 - 10:29:41 EDT

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-215) resolveFault() needs to throw FaultFailureException subclass of CayenneRuntimeException"

    Andrus Adamchik <andru..bjectstyle.org> wrote:
    >
    > On Oct 18, 2004, at 10:03 PM, Mike Kienenberger wrote:
    >
    > > I'm not opposed to an exception being thrown (in fact, I think it's a
    > > good
    > > idea), but can we make the exception thrown a subclass of
    > > CayenneRuntimeException so it can be easily detected apart from general
    > > database errors? The thought of having to parse the exception message
    > > text
    > > to determine this does not appeal to me.
    >
    > I agree... Some sort of "FaultFailureException extends
    > CayenneRuntimeException" (better name?) should be more appropriate.
    > Besides in a subclass we can stick an ObjectId as one of the ivars.
    > Though unfortunately we will have to postpone this till after 1.1, as
    > we are in a deep and final freeze now... In fact I am planning to
    > switch 1.1 to the CVS STABLE branch around this weekend when RC2 should
    > be out. This should open HEAD for 1.2 additions.

    That was my problem as well. I couldn't think of a good name.

    How about DatabaseIntegrityException or DataIntegrityException?
    I also thought that an instance variable should be created, although I was
    considering sticking the actual DataObject in it rather than the ObjectId.
    Since I don't plan on using the instance variable, that part doesn't really
    matter to me, though.

    I guess I'll make a local mod. I *must* have this functionality for our
    go-live system next week. I'd prefer to at least use the same
    fully-qualified Exception name if we can determine a good name so a future
    upgrade will be transparent.

    -Mike



    This archive was generated by hypermail 2.0.0 : Tue Oct 19 2004 - 10:28:19 EDT