~ubuntu-branches/debian/experimental/php-nette/experimental

« back to all changes in this revision

Viewing changes to Nette-2.1.0RC/Nette/common/exceptions.php

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2013-11-30 08:47:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20131130084754-4udf1xsu9085tnfc
Tags: 2.1.0~rc-1
* New upstream branch
* Update copyright

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
/**
 
4
 * This file is part of the Nette Framework (http://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
namespace Nette;
 
13
 
 
14
use Nette;
 
15
 
 
16
 
 
17
/**
 
18
 * The exception that is thrown when the value of an argument is
 
19
 * outside the allowable range of values as defined by the invoked method.
 
20
 */
 
21
class ArgumentOutOfRangeException extends \InvalidArgumentException
 
22
{
 
23
}
 
24
 
 
25
 
 
26
/**
 
27
 * The exception that is thrown when a method call is invalid for the object's
 
28
 * current state, method has been invoked at an illegal or inappropriate time.
 
29
 */
 
30
class InvalidStateException extends \RuntimeException
 
31
{
 
32
}
 
33
 
 
34
 
 
35
/**
 
36
 * The exception that is thrown when a requested method or operation is not implemented.
 
37
 */
 
38
class NotImplementedException extends \LogicException
 
39
{
 
40
}
 
41
 
 
42
 
 
43
/**
 
44
 * The exception that is thrown when an invoked method is not supported. For scenarios where
 
45
 * it is sometimes possible to perform the requested operation, see InvalidStateException.
 
46
 */
 
47
class NotSupportedException extends \LogicException
 
48
{
 
49
}
 
50
 
 
51
 
 
52
/**
 
53
 * The exception that is thrown when a requested method or operation is deprecated.
 
54
 */
 
55
class DeprecatedException extends NotSupportedException
 
56
{
 
57
}
 
58
 
 
59
 
 
60
/**
 
61
 * The exception that is thrown when accessing a class member (property or method) fails.
 
62
 */
 
63
class MemberAccessException extends \LogicException
 
64
{
 
65
}
 
66
 
 
67
 
 
68
/**
 
69
 * The exception that is thrown when an I/O error occurs.
 
70
 */
 
71
class IOException extends \RuntimeException
 
72
{
 
73
}
 
74
 
 
75
 
 
76
/**
 
77
 * The exception that is thrown when accessing a file that does not exist on disk.
 
78
 */
 
79
class FileNotFoundException extends IOException
 
80
{
 
81
}
 
82
 
 
83
 
 
84
/**
 
85
 * The exception that is thrown when part of a file or directory cannot be found.
 
86
 */
 
87
class DirectoryNotFoundException extends IOException
 
88
{
 
89
}
 
90
 
 
91
 
 
92
/**
 
93
 * The exception that is thrown when an argument does not match with the expected value.
 
94
 */
 
95
class InvalidArgumentException extends \InvalidArgumentException
 
96
{
 
97
}
 
98
 
 
99
 
 
100
/**
 
101
 * The exception that is thrown when an illegal index was requested.
 
102
 */
 
103
class OutOfRangeException extends \OutOfRangeException
 
104
{
 
105
}
 
106
 
 
107
 
 
108
/**
 
109
 * The exception that is thrown when a value (typically returned by function) does not match with the expected value.
 
110
 */
 
111
class UnexpectedValueException extends \UnexpectedValueException
 
112
{
 
113
}
 
114
 
 
115
 
 
116
/**
 
117
 * The exception that is thrown when static class is instantiated.
 
118
 */
 
119
class StaticClassException extends \LogicException
 
120
{
 
121
}
 
122
 
 
123
 
 
124
/**
 
125
 * The exception that indicates errors that can not be recovered from. Execution of
 
126
 * the script should be halted.
 
127
 */
 
128
class FatalErrorException extends \ErrorException
 
129
{
 
130
 
 
131
        public function __construct($message, $code, $severity, $file, $line, $context, \Exception $previous = NULL)
 
132
        {
 
133
                parent::__construct($message, $code, $severity, $file, $line, $previous);
 
134
                $this->context = $context;
 
135
        }
 
136
 
 
137
}