How can I handle validation exception?

From: Νίκος Παράσχου (niparas..mail.com)
Date: Tue Mar 10 2009 - 11:03:52 EDT

  • Next message: Andrus Adamchik: "Re: How can I handle validation exception?"

    Hello,

    I implemented validateForSave(ValidationResult validationResult) in one
    of my ObjEntities. When a specific condition is not met, a
    ValidationException is thrown.

    How can I handle this ValidationException?

    The following doesn't work (I get: ValidationException is not thrown
    anywhere inside block try{}):

    try {
            mycontext.commit();
    }
    catch(ValidationException vex) {
            ...
    }

    Thank you,
    Nikos



    This archive was generated by hypermail 2.0.0 : Tue Mar 10 2009 - 11:04:31 EDT