mirror of
https://github.com/igorsimdyanov/php8.git
synced 2025-08-06 11:10:42 +00:00
14 lines
432 B
PHP
14 lines
432 B
PHP
<?php
|
|
try {
|
|
$code = rand(0, 1);
|
|
if (!$code) {
|
|
throw new Exception('Первая точка входа', $code);
|
|
} else {
|
|
throw new Exception('Вторая точка входа', $code);
|
|
}
|
|
} catch (Exception $exp) {
|
|
echo "Исключение {$exp->getCode()} : {$exp->getMessage()}<br />";
|
|
echo "в файле {$exp->getFile()}<br />";
|
|
echo "в строке {$exp->getLine()}<br />";
|
|
}
|