1: <?php
2:
3: /**
4: * @package exceptions
5: *
6: * @author Антон Кургузенков <kurguzenkov@list.ru>
7: *
8: * @version 0.01
9: * @since 2012-11-02
10: */
11:
12: class FileNotFoundException extends Exception
13: {
14: const MESSAGE = 'File not found';
15:
16: public function __construct()
17: {
18: $this->message = self::MESSAGE;
19: }
20: }
21:
22: /**
23: * @package exceptions
24: *
25: * @author Антон Кургузенков <kurguzenkov@list.ru>
26: *
27: * @version 0.01
28: * @since 2012-11-02
29: */
30:
31: class InvalidFileException extends Exception
32: {
33:
34: public function __construct($path)
35: {
36: $this->message = "Invalid file: $path";
37: }
38: }
39:
40: /**
41: * @package exceptions
42: *
43: * @author Антон Кургузенков <kurguzenkov@list.ru>
44: *
45: * @version 0.01
46: * @since 2012-11-02
47: */
48:
49: class InvalidChannelException extends Exception
50: {
51:
52: public function __construct($chenalName)
53: {
54: $this->message = "Invalid channel: {$chenalName}";
55: }
56: }
57:
58: /**
59: * @package exceptions
60: *
61: * @author Антон Кургузенков <kurguzenkov@list.ru>
62: *
63: * @version 0.01
64: * @since 2012-11-02
65: */
66:
67: class UnsupportedFormatException extends Exception
68: {
69:
70: public function __construct($format)
71: {
72: $this->message = "This image format ($format) is not supported by your version of GD library";
73: }
74: }
75:
76: /**
77: * @package exceptions
78: *
79: * @author Антон Кургузенков <kurguzenkov@list.ru>
80: *
81: * @version 0.01
82: * @since 2012-11-02
83: */
84:
85: class GDnotInstalledException extends Exception
86: {
87: public function __construct()
88: {
89: $this->message = "The GD library is not installed";
90: }
91: }
92:
93: /**
94: * @package exceptions
95: *
96: * @author Антон Кургузенков <kurguzenkov@list.ru>
97: *
98: * @version 0.01
99: * @since 2012-11-02
100: */
101:
102: class FileAlreadyExistsException extends Exception
103: {
104: public function __construct($path)
105: {
106: $this->message = "File $path is already exists!";
107: }
108: }
109:
110: /**
111: * @package exceptions
112: *
113: * @author Антон Кургузенков <kurguzenkov@list.ru>
114: *
115: * @version 0.01
116: * @since 2012-11-02
117: */
118:
119: class FileNotSaveException extends Exception
120: {
121: public function __construct($path)
122: {
123: $this->message = "File: $path not saved";
124: }
125: }
126:
127: /**
128: * @package exceptions
129: *
130: * @author Антон Кургузенков <kurguzenkov@list.ru>
131: *
132: * @version 0.01
133: * @since 2012-11-02
134: */
135:
136: class IllegalArgumentException extends Exception
137: {
138: public function __consruct()
139: {
140: $this->message = "Illegal argument";
141: }
142: }
143: ?>