trycatch

 avatar
unknown
php
4 years ago
226 B
5
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...