Bonjour à tous!
Voilà, un petit problème que je ne comprends pas...
Voilà lo code:
Et il m'affiche:Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 <? class dvpExempleException { public function genererException($probleme) { if(!is_int($probleme)) { throw new Exception ("L'argument -$probleme- n'est pas numérique"); } } } $Obj = new dvpExempleException(); try { $Obj->genererException('chaîne au lieu d\'un numérique'); } catch (Exception $exception) { echo $exception->getMessage().','.$exception->getLine().','.$exception->getFile(); } ?>
8OCode:
1
2 genererException('chaîne au lieu d\'un numérique'); } catch (Exception $exception) { echo $exception->getMessage().','.$exception->getLine().','.$exception->getFile(); } ?>
Je ne comprends pas trop.
Merci :yaisse2: