Source for file RSDEngineErrorManager.php

Documentation is available at RSDEngineErrorManager.php


1 <?php
2 // RSDEngine: The Rapid and Secure Development Engine
3 // Copyright (C) 2003 Lukas Feiler
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
19 /**Contains just the class RSDEngineErrorManager.
20 *
21 * @author Lukas Feiler <lukas.feiler@chello.at>
22 * @copyright Lukas Feiler 2003
23 * @package RSDEngine
24 * @filesource
25 */
26
27 /**RSDEngineErrorManager extends the class RSErrorManager.
28 */
29 require_once('RSErrorManager/RSErrorManager.php');
30
31 /**RSDEngineErrorManager implements an error management for the RSDEngine.
32 *
33 * @author Lukas Feiler <lukas.feiler@chello.at>
34 * @copyright Lukas Feiler 2003
35 * @package RSDEngine
36 * @version 0.1.9
37 */
38 class RSDEngineErrorManager extends RSErrorManager {
39
40 /**Calls the parent constructor.
41 * @param String $newOperation The current operation - the default value for property 'operation' of raised errors.
42 */
43 function RSDEngineErrorManager($newOperation = 'RSDEngine operation')
44 {
45 $this->RSErrorManager($newOperation);
46 }
47
48 /**Hands every error to onFatalError.
49 *
50 * @param PEAR_Error
51 */
52 function catch($pearError)
53 {
54 RSErrorManager::catch($pearError);
55 //$this->onFatalError($pearError);
56 }
57
58 /**RSErrorManager:onFatalError is overwritten to customize the reaction on fatal errors.
59 */
60 function onFatalError($pearError)
61 {
62 echo "<h1>An Error Occurred</h1>";
63 echo "<b>Message:</b> " . nl2br(htmlspecialchars($pearError->getMessage())) . "<br>" .
64 "<b>Code:</b> " . $pearError->getCode() . "<br>";
65 if (RSErrorManager::isRSError($pearError)) {
66 echo "<b>Object:</b> " . $pearError->getObject() . "<br>" .
67 "<b>Property:</b> " . $pearError->getProperty() . "<br>" .
68 "<b>Operation:</b> " . $pearError->getOperation() . "<br>";
69 }
70 echo "<b>toString:</b> " . $pearError->toString() . "<br>";
71 exit;
72 }
73 }
74 ?>

Documentation generated on Mon, 8 Dec 2003 13:12:43 +0100 by phpDocumentor 1.2.3