|
class | php |
| An exception for terminatinating execution or to throw for unit testing. More...
|
|
|
| __construct ($message='Terminate Gracefully', $code=0) |
| Test if exceptions should be thrown or if we should just exit. More...
|
|
◆ __construct()
CAS_GracefullTerminationException::__construct |
( |
|
$message = 'Terminate Gracefully' , |
|
|
|
$code = 0 |
|
) |
| |
Test if exceptions should be thrown or if we should just exit.
In production usage we want to just exit cleanly when prompting the user for a redirect without filling the error logs with uncaught exceptions. In unit testing scenarios we cannot exit or we won't be able to continue with our tests.
- Parameters
-
string | $message | Message Text |
string | $code | Error code |
- Returns
- void
Definition at line 60 of file GracefullTerminationException.php.
References $code, $message, and exit.
63 if (self::$_exitWhenThrown) {
catch(Exception $e) $message
◆ throwInsteadOfExiting()
static CAS_GracefullTerminationException::throwInsteadOfExiting |
( |
| ) |
|
|
static |
Force phpcas to thow Exceptions instead of calling exit() Needed for unit testing.
Generally shouldn't be used in production due to an increase in Apache error logging if CAS_GracefulTerminiationExceptions are not caught and handled.
- Returns
- void
Definition at line 80 of file GracefullTerminationException.php.
82 self::$_exitWhenThrown =
false;
◆ $_exitWhenThrown
CAS_GracefullTerminationException::$_exitWhenThrown = true |
|
staticprivate |
The documentation for this class was generated from the following file: