1: <?php
2:
3: /**
4: * This file is part of the Nette Framework (https://nette.org)
5: *
6: * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
7: *
8: * For the full copyright and license information, please view
9: * the file license.txt that was distributed with this source code.
10: */
11:
12: // no namespace
13:
14:
15:
16: /*
17: some useful SPL exception:
18:
19: - LogicException
20: - InvalidArgumentException
21: - LengthException
22: - RuntimeException
23: - OutOfBoundsException
24: - UnexpectedValueException
25:
26: other SPL exceptions are ambiguous; do not use them
27:
28: ErrorException is corrupted in PHP < 5.3
29: */
30:
31:
32:
33: /**
34: * The exception that is thrown when the value of an argument is
35: * outside the allowable range of values as defined by the invoked method.
36: */
37: class ArgumentOutOfRangeException extends InvalidArgumentException
38: {
39: }
40:
41:
42:
43: /**
44: * The exception that is thrown when a method call is invalid for the object's
45: * current state, method has been invoked at an illegal or inappropriate time.
46: */
47: class InvalidStateException extends RuntimeException
48: {
49: }
50:
51:
52:
53: /**
54: * The exception that is thrown when a requested method or operation is not implemented.
55: */
56: class NotImplementedException extends LogicException
57: {
58: }
59:
60:
61:
62: /**
63: * The exception that is thrown when an invoked method is not supported. For scenarios where
64: * it is sometimes possible to perform the requested operation, see InvalidStateException.
65: */
66: class NotSupportedException extends LogicException
67: {
68: }
69:
70:
71:
72: /**
73: * The exception that is thrown when a requested method or operation is deprecated.
74: */
75: class DeprecatedException extends NotSupportedException
76: {
77: }
78:
79:
80:
81: /**
82: * The exception that is thrown when accessing a class member (property or method) fails.
83: */
84: class MemberAccessException extends LogicException
85: {
86: }
87:
88:
89:
90: /**
91: * The exception that is thrown when an I/O error occurs.
92: */
93: class IOException extends RuntimeException
94: {
95: }
96:
97:
98:
99: /**
100: * The exception that is thrown when accessing a file that does not exist on disk.
101: */
102: class FileNotFoundException extends IOException
103: {
104: }
105:
106:
107:
108: /**
109: * The exception that is thrown when part of a file or directory cannot be found.
110: */
111: class DirectoryNotFoundException extends IOException
112: {
113: }
114:
115:
116:
117: /**
118: * The exception that indicates errors that can not be recovered from. Execution of
119: * the script should be halted.
120: */
121:
122: class FatalErrorException extends ErrorException
123: {
124:
125: public function __construct($message, $code, $severity, $file, $line, $context)
126: {
127: parent::__construct($message, $code, $severity, $file, $line);
128: $this->context = $context;
129: }
130:
131: }
132:
133:
134: