Skip to content
PHP Ecosystem
Explore

ExitException

API reference › yii › base › ExitException

classyii\base\ExitException
ExtendsException
Since2.0
Sourceframework/base/ExitException.php

ExitException represents a normal termination of an application.

Do not catch ExitException. Yii will handle this exception to terminate the application gracefully.

PropertyTypeDescriptionDefined by
$statusCodeintThe exit status code Default: null.ExitException
MethodDescriptionDefined by
__construct()Constructor.ExitException
public function __construct(int $status = 0, string $message = null, int $code = 0, Throwable|null $previous = null)

Constructor.

Parameters

ParameterTypeDescription
$statusintThe exit status code
$messagestringError message
$codeintError code
$previousThrowable|nullThe previous exception used for the exception chaining.