Changeset 7279


Ignore:
Timestamp:
Jan 25, 2017, 9:34:04 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #2049: Project-specific annotations

Calling HibernateUtil.flush() before HibernateUtil.commit() inside the DbControl.commit() method (see [7255]) results in different exceptions being thrown in some cases. For example, the TestUser.test_duplicate() method fails due not detecting a DatabaseException.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.10-stable/src/core/net/sf/basedb/core/HibernateUtil.java

    r7252 r7279  
    14021402      session.flush();
    14031403    }
    1404     catch(HibernateException ex)
     1404    catch (ConstraintViolationException ex)
     1405    {
     1406      // This is the best we can do... I think...
     1407      throw new DatabaseException(ex.getSQLException());
     1408    }
     1409    catch (StaleStateException ex)
     1410    {
     1411      throw new ItemModifiedException(ex);
     1412    }
     1413    catch (HibernateException ex)
    14051414    {
    14061415      throw new BaseException(ex);
Note: See TracChangeset for help on using the changeset viewer.