Doctrine 1
  1. Doctrine 1
  2. DC-207

Masked exception makes it very difficult to debug

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-ALPHA1, 1.2.0-ALPHA2, 1.2.0-ALPHA3, 1.2.0-BETA1
    • Fix Version/s: 1.2.0-BETA2
    • Component/s: Connection
    • Labels:
      None

      Description

      When you try to save an object, but the database does not exist, Doctrine throws a Doctrine_Transaction_Exception exception with the message "Rollback failed. There is no active transaction.".

      But the real problem is that the database does not exit. The problem is in the Doctrine_Connection_UnitOfWork class around line 146:

              } catch (Exception $e) {
                  // Make sure we roll back our internal transaction
                  //$record->state($state);
                  $conn->rollback();
                  throw $e;
              }
      

      The exception occurs because of "$conn->rollback();", and so the "throw $e;" is never reached.

      We should probably throws an exception earlier about the fact that the database does not exist.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Fabien Potencier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: