phpCAS version 1.3.6

GracefullTerminationException.php
Go to the documentation of this file.
1 <?php
2
43 class CAS_GracefullTerminationException
44 extends RuntimeException
45 implements CAS_Exception
46 {
47
60 public function __construct ($message = 'Terminate Gracefully', $code = 0)
61 {
62 // Exit cleanly to avoid filling up the logs with uncaught exceptions.
63 if (self::$_exitWhenThrown) {
64 exit;
65 } else {
66 // Throw exceptions to allow unit testing to continue;
67 parent::__construct($message, $code);
68 }
69 }
70
71 private static $_exitWhenThrown = true;
80 public static function throwInsteadOfExiting()
81 {
82 self::$_exitWhenThrown = false;
83 }
84
85 }
86 ?>
CAS_GracefullTerminationException\__construct
__construct($message='Terminate Gracefully', $code=0)
Definition: GracefullTerminationException.php:60
CAS_GracefullTerminationException
Definition: GracefullTerminationException.php:43
CAS_GracefullTerminationException\throwInsteadOfExiting
static throwInsteadOfExiting()
Definition: GracefullTerminationException.php:80
CAS_GracefullTerminationException\$_exitWhenThrown
static $_exitWhenThrown
Definition: GracefullTerminationException.php:71
CAS_Exception
Definition: Exception.php:55