Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/writeguard/AphrontWriteGuard.php
Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | public function dispose() { | ||||
if (!self::$instance) { | if (!self::$instance) { | ||||
throw new Exception(pht( | throw new Exception(pht( | ||||
'Attempting to dispose of write guard, but no write guard is active!')); | 'Attempting to dispose of write guard, but no write guard is active!')); | ||||
} | } | ||||
if ($this->allowDepth > 0) { | if ($this->allowDepth > 0) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Imbalanced %s: more % calls than %s calls.', | 'Imbalanced %s: more %s calls than %s calls.', | ||||
__CLASS__, | __CLASS__, | ||||
'beginUnguardedWrites()', | 'beginUnguardedWrites()', | ||||
'endUnguardedWrites()')); | 'endUnguardedWrites()')); | ||||
} | } | ||||
self::$instance = null; | self::$instance = null; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 158 Lines • Show Last 20 Lines |