trycatch
unknown
php
4 years ago
226 B
6
Indexable
<?php
try {
echo 'toto'."\n";
// ici tu testes ta date
throw new \Exception('Message erreur');
echo 'titi'."\n";
} catch(\Exception $e) {
echo $e->getMessage()."\n";
// ici tu rediriges
}
echo 'tata'."\n";Editor is loading...