1aeefefb293cdd64baa3571aa0388cd3716ad2c2
[core.git] / inc / classes / exceptions / state / class_InvalidStateException.php
1 <?php
2 /**
3  * This exception is thrown when the default state is missing
4  *
5  * @author              Roland Haeder <webmaster@ship-simu.org>
6  * @version             0.0.0
7  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
8  * @license             GNU GPL 3.0 or any newer version
9  * @link                http://www.ship-simu.org
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <http://www.gnu.org/licenses/>.
23  */
24 class InvalidStateException extends FrameworkException {
25         /**
26          * The super constructor for all exceptions
27          *
28          * @param       $msgArray       An array with message parts
29          * @param       $code           An optional code for better debugging
30          * @return      void
31          */
32         public function __construct(array $msgArray, $code) {
33                 // Prepare the message
34                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
35                         $msgArray[0]->__toString(),
36                         $this->getLine(),
37                         $msgArray[1],
38                         $msgArray[0]->getClassName()
39                 );
40
41                 // Set extra data
42                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
43
44                 // Call parent contructor with message
45                 parent::__construct($message, $code);
46         }
47 }
48
49 // [EOF]
50 ?>
51 <?php
52 /**
53  * This exception is thrown when the default state is missing
54  *
55  * @author              Roland Haeder <webmaster@ship-simu.org>
56  * @version             0.0.0
57  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
58  * @license             GNU GPL 3.0 or any newer version
59  * @link                http://www.ship-simu.org
60  *
61  * This program is free software: you can redistribute it and/or modify
62  * it under the terms of the GNU General Public License as published by
63  * the Free Software Foundation, either version 3 of the License, or
64  * (at your option) any later version.
65  *
66  * This program is distributed in the hope that it will be useful,
67  * but WITHOUT ANY WARRANTY; without even the implied warranty of
68  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
69  * GNU General Public License for more details.
70  *
71  * You should have received a copy of the GNU General Public License
72  * along with this program. If not, see <http://www.gnu.org/licenses/>.
73  */
74 class InvalidStateException extends FrameworkException {
75         /**
76          * The super constructor for all exceptions
77          *
78          * @param       $msgArray       An array with message parts
79          * @param       $code           An optional code for better debugging
80          * @return      void
81          */
82         public function __construct(array $msgArray, $code) {
83                 // Prepare the message
84                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
85                         $msgArray[0]->__toString(),
86                         $this->getLine(),
87                         $msgArray[1],
88                         $msgArray[0]->getClassName()
89                 );
90
91                 // Set extra data
92                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
93
94                 // Call parent contructor with message
95                 parent::__construct($message, $code);
96         }
97 }
98
99 // [EOF]
100 ?>
101 <?php
102 /**
103  * This exception is thrown when the default state is missing
104  *
105  * @author              Roland Haeder <webmaster@ship-simu.org>
106  * @version             0.0.0
107  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
108  * @license             GNU GPL 3.0 or any newer version
109  * @link                http://www.ship-simu.org
110  *
111  * This program is free software: you can redistribute it and/or modify
112  * it under the terms of the GNU General Public License as published by
113  * the Free Software Foundation, either version 3 of the License, or
114  * (at your option) any later version.
115  *
116  * This program is distributed in the hope that it will be useful,
117  * but WITHOUT ANY WARRANTY; without even the implied warranty of
118  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
119  * GNU General Public License for more details.
120  *
121  * You should have received a copy of the GNU General Public License
122  * along with this program. If not, see <http://www.gnu.org/licenses/>.
123  */
124 class InvalidStateException extends FrameworkException {
125         /**
126          * The super constructor for all exceptions
127          *
128          * @param       $msgArray       An array with message parts
129          * @param       $code           An optional code for better debugging
130          * @return      void
131          */
132         public function __construct(array $msgArray, $code) {
133                 // Prepare the message
134                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
135                         $msgArray[0]->__toString(),
136                         $this->getLine(),
137                         $msgArray[1],
138                         $msgArray[0]->getClassName()
139                 );
140
141                 // Set extra data
142                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
143
144                 // Call parent contructor with message
145                 parent::__construct($message, $code);
146         }
147 }
148
149 // [EOF]
150 ?>
151 <?php
152 /**
153  * This exception is thrown when the default state is missing
154  *
155  * @author              Roland Haeder <webmaster@ship-simu.org>
156  * @version             0.0.0
157  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
158  * @license             GNU GPL 3.0 or any newer version
159  * @link                http://www.ship-simu.org
160  *
161  * This program is free software: you can redistribute it and/or modify
162  * it under the terms of the GNU General Public License as published by
163  * the Free Software Foundation, either version 3 of the License, or
164  * (at your option) any later version.
165  *
166  * This program is distributed in the hope that it will be useful,
167  * but WITHOUT ANY WARRANTY; without even the implied warranty of
168  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
169  * GNU General Public License for more details.
170  *
171  * You should have received a copy of the GNU General Public License
172  * along with this program. If not, see <http://www.gnu.org/licenses/>.
173  */
174 class InvalidStateException extends FrameworkException {
175         /**
176          * The super constructor for all exceptions
177          *
178          * @param       $msgArray       An array with message parts
179          * @param       $code           An optional code for better debugging
180          * @return      void
181          */
182         public function __construct(array $msgArray, $code) {
183                 // Prepare the message
184                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
185                         $msgArray[0]->__toString(),
186                         $this->getLine(),
187                         $msgArray[1],
188                         $msgArray[0]->getClassName()
189                 );
190
191                 // Set extra data
192                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
193
194                 // Call parent contructor with message
195                 parent::__construct($message, $code);
196         }
197 }
198
199 // [EOF]
200 ?>
201 <?php
202 /**
203  * This exception is thrown when the default state is missing
204  *
205  * @author              Roland Haeder <webmaster@ship-simu.org>
206  * @version             0.0.0
207  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
208  * @license             GNU GPL 3.0 or any newer version
209  * @link                http://www.ship-simu.org
210  *
211  * This program is free software: you can redistribute it and/or modify
212  * it under the terms of the GNU General Public License as published by
213  * the Free Software Foundation, either version 3 of the License, or
214  * (at your option) any later version.
215  *
216  * This program is distributed in the hope that it will be useful,
217  * but WITHOUT ANY WARRANTY; without even the implied warranty of
218  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
219  * GNU General Public License for more details.
220  *
221  * You should have received a copy of the GNU General Public License
222  * along with this program. If not, see <http://www.gnu.org/licenses/>.
223  */
224 class InvalidStateException extends FrameworkException {
225         /**
226          * The super constructor for all exceptions
227          *
228          * @param       $msgArray       An array with message parts
229          * @param       $code           An optional code for better debugging
230          * @return      void
231          */
232         public function __construct(array $msgArray, $code) {
233                 // Prepare the message
234                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
235                         $msgArray[0]->__toString(),
236                         $this->getLine(),
237                         $msgArray[1],
238                         $msgArray[0]->getClassName()
239                 );
240
241                 // Set extra data
242                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
243
244                 // Call parent contructor with message
245                 parent::__construct($message, $code);
246         }
247 }
248
249 // [EOF]
250 ?>
251 <?php
252 /**
253  * This exception is thrown when the default state is missing
254  *
255  * @author              Roland Haeder <webmaster@ship-simu.org>
256  * @version             0.0.0
257  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
258  * @license             GNU GPL 3.0 or any newer version
259  * @link                http://www.ship-simu.org
260  *
261  * This program is free software: you can redistribute it and/or modify
262  * it under the terms of the GNU General Public License as published by
263  * the Free Software Foundation, either version 3 of the License, or
264  * (at your option) any later version.
265  *
266  * This program is distributed in the hope that it will be useful,
267  * but WITHOUT ANY WARRANTY; without even the implied warranty of
268  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
269  * GNU General Public License for more details.
270  *
271  * You should have received a copy of the GNU General Public License
272  * along with this program. If not, see <http://www.gnu.org/licenses/>.
273  */
274 class InvalidStateException extends FrameworkException {
275         /**
276          * The super constructor for all exceptions
277          *
278          * @param       $msgArray       An array with message parts
279          * @param       $code           An optional code for better debugging
280          * @return      void
281          */
282         public function __construct(array $msgArray, $code) {
283                 // Prepare the message
284                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
285                         $msgArray[0]->__toString(),
286                         $this->getLine(),
287                         $msgArray[1],
288                         $msgArray[0]->getClassName()
289                 );
290
291                 // Set extra data
292                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
293
294                 // Call parent contructor with message
295                 parent::__construct($message, $code);
296         }
297 }
298
299 // [EOF]
300 ?>
301 <?php
302 /**
303  * This exception is thrown when the default state is missing
304  *
305  * @author              Roland Haeder <webmaster@ship-simu.org>
306  * @version             0.0.0
307  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
308  * @license             GNU GPL 3.0 or any newer version
309  * @link                http://www.ship-simu.org
310  *
311  * This program is free software: you can redistribute it and/or modify
312  * it under the terms of the GNU General Public License as published by
313  * the Free Software Foundation, either version 3 of the License, or
314  * (at your option) any later version.
315  *
316  * This program is distributed in the hope that it will be useful,
317  * but WITHOUT ANY WARRANTY; without even the implied warranty of
318  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
319  * GNU General Public License for more details.
320  *
321  * You should have received a copy of the GNU General Public License
322  * along with this program. If not, see <http://www.gnu.org/licenses/>.
323  */
324 class InvalidStateException extends FrameworkException {
325         /**
326          * The super constructor for all exceptions
327          *
328          * @param       $msgArray       An array with message parts
329          * @param       $code           An optional code for better debugging
330          * @return      void
331          */
332         public function __construct(array $msgArray, $code) {
333                 // Prepare the message
334                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
335                         $msgArray[0]->__toString(),
336                         $this->getLine(),
337                         $msgArray[1],
338                         $msgArray[0]->getClassName()
339                 );
340
341                 // Set extra data
342                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
343
344                 // Call parent contructor with message
345                 parent::__construct($message, $code);
346         }
347 }
348
349 // [EOF]
350 ?>
351 <?php
352 /**
353  * This exception is thrown when the default state is missing
354  *
355  * @author              Roland Haeder <webmaster@ship-simu.org>
356  * @version             0.0.0
357  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
358  * @license             GNU GPL 3.0 or any newer version
359  * @link                http://www.ship-simu.org
360  *
361  * This program is free software: you can redistribute it and/or modify
362  * it under the terms of the GNU General Public License as published by
363  * the Free Software Foundation, either version 3 of the License, or
364  * (at your option) any later version.
365  *
366  * This program is distributed in the hope that it will be useful,
367  * but WITHOUT ANY WARRANTY; without even the implied warranty of
368  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
369  * GNU General Public License for more details.
370  *
371  * You should have received a copy of the GNU General Public License
372  * along with this program. If not, see <http://www.gnu.org/licenses/>.
373  */
374 class InvalidStateException extends FrameworkException {
375         /**
376          * The super constructor for all exceptions
377          *
378          * @param       $msgArray       An array with message parts
379          * @param       $code           An optional code for better debugging
380          * @return      void
381          */
382         public function __construct(array $msgArray, $code) {
383                 // Prepare the message
384                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
385                         $msgArray[0]->__toString(),
386                         $this->getLine(),
387                         $msgArray[1],
388                         $msgArray[0]->getClassName()
389                 );
390
391                 // Set extra data
392                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
393
394                 // Call parent contructor with message
395                 parent::__construct($message, $code);
396         }
397 }
398
399 // [EOF]
400 ?>
401 <?php
402 /**
403  * This exception is thrown when the default state is missing
404  *
405  * @author              Roland Haeder <webmaster@ship-simu.org>
406  * @version             0.0.0
407  * @copyright   Copyright (c) 2007, 2008 Roland Haeder, 2009 Core Developer Team
408  * @license             GNU GPL 3.0 or any newer version
409  * @link                http://www.ship-simu.org
410  *
411  * This program is free software: you can redistribute it and/or modify
412  * it under the terms of the GNU General Public License as published by
413  * the Free Software Foundation, either version 3 of the License, or
414  * (at your option) any later version.
415  *
416  * This program is distributed in the hope that it will be useful,
417  * but WITHOUT ANY WARRANTY; without even the implied warranty of
418  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
419  * GNU General Public License for more details.
420  *
421  * You should have received a copy of the GNU General Public License
422  * along with this program. If not, see <http://www.gnu.org/licenses/>.
423  */
424 class InvalidStateException extends FrameworkException {
425         /**
426          * The super constructor for all exceptions
427          *
428          * @param       $msgArray       An array with message parts
429          * @param       $code           An optional code for better debugging
430          * @return      void
431          */
432         public function __construct(array $msgArray, $code) {
433                 // Prepare the message
434                 $message = sprintf("[%s:%d] Cannot resolve state <span class=\"exception_reason\">%s (class name: %s)</span>.",
435                         $msgArray[0]->__toString(),
436                         $this->getLine(),
437                         $msgArray[1],
438                         $msgArray[0]->getClassName()
439                 );
440
441                 // Set extra data
442                 $this->setExtraData($msgArray[0]->getClassName().':'.$this->getLine());
443
444                 // Call parent contructor with message
445                 parent::__construct($message, $code);
446         }
447 }
448
449 // [EOF]
450 ?>