Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
try {
3
    // Try something.
4
    $variable = 'string';
5
} catch (Exception $e) {
6
    // Comment.
7
    echo 'something broke';
8
}
9
 
10
try {
11
    // Try something.
12
    $variable = 'string';
13
} catch (Exception $e) {
14
}
15
 
16
try {
17
    // Try something.
18
    $variable = 'string';
19
} catch (Exception $e) {
20
    // Dont want to do anything.
21
}
22
 
23
try {
24
    $variable = 'string';
25
} catch (MyException $e) {
26
    echo 'something broke';
27
} catch (Exception $e) {
28
    echo 'something broke';
29
}
30
 
31
try {
32
    $variable = 'string';
33
} catch (MyException $e) {
34
 
35
} catch (Exception $e) {
36
    echo 'something broke';
37
}
38
 
39
try {
40
    $variable = 'string';
41
} catch (MyException $e) {
42
    // Dont do anything.
43
} catch (Exception $e) {
44
    // Do nothing.
45
}
46
 
47
try {
48
    $variable = 'string';
49
} catch (MyException $e) {
50
} catch (YourException $e) {
51
} catch (OurException $e) {
52
} catch (Exception $e) {
53
}
54
 
55
?>