noalyss Version-9
exception.php
Go to the documentation of this file.
1<?php
2
3 function foo()
4 {
5 print 'foo -1';
6 throw new Exception('Zut',5);
7 print 'foo -2';
8 }
9function foo2()
10{
11 try {
12 print 'main0';
13 foo();
14 print 'main-1';
15 } catch (Exception $e){
16 print "\n\nExceptionCode = ".$e->getCode()."\n\n";
17 echo $e->getTraceAsString();
18 throw $e;
19 }
20}
21
22try {
23print 'main-2';
24foo2();
25print 'main-3';
26} catch (Exception $e)
27{
28 echo $e->getMessage();
29 echo $e->getTraceAsString();
30}
print
Definition: exception.php:25
foo()
Definition: exception.php:3
foo2()
Definition: exception.php:9