Commit 2a992b82 authored by Steve Müller's avatar Steve Müller Committed by GitHub

Merge pull request #2521 from frost-nzcr4/patch-1

Escape to the global namespace under custom namespaces
parents f048314c d7f23080
...@@ -15,7 +15,7 @@ Transaction demarcation with the Doctrine DBAL looks as follows: ...@@ -15,7 +15,7 @@ Transaction demarcation with the Doctrine DBAL looks as follows:
try{ try{
// do stuff // do stuff
$conn->commit(); $conn->commit();
} catch(Exception $e) { } catch (\Exception $e) {
$conn->rollBack(); $conn->rollBack();
throw $e; throw $e;
} }
...@@ -90,7 +90,7 @@ example: ...@@ -90,7 +90,7 @@ example:
... ...
$conn->commit(); // 2 => 1 $conn->commit(); // 2 => 1
} catch (Exception $e) { } catch (\Exception $e) {
$conn->rollBack(); // 2 => 1, transaction marked for rollback only $conn->rollBack(); // 2 => 1, transaction marked for rollback only
throw $e; throw $e;
} }
...@@ -98,7 +98,7 @@ example: ...@@ -98,7 +98,7 @@ example:
... ...
$conn->commit(); // 1 => 0, "real" transaction committed $conn->commit(); // 1 => 0, "real" transaction committed
} catch (Exception $e) { } catch (\Exception $e) {
$conn->rollBack(); // 1 => 0, "real" transaction rollback $conn->rollBack(); // 1 => 0, "real" transaction rollback
throw $e; throw $e;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment