Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezxmlrpcerrorhandler.php
Go to the documentation of this file.
1 <?
3 //
4 // $Id: ezxmlrpcerrorhandler.php 6023 2001-07-05 09:57:04Z matta $
5 //
6 // Definition of eZXMLRPC Error Handler
7 //
8 // Matt Allen <ma@investigationmarketplace.com>
9 // Created on: <05-Jul-2001 19:27:00 ma>
10 //
11 // This source file is part of Exponential Basic, publishing software.
12 // Copyright (C) 1999-2000 eZ systems as
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
29 // Therse are the available Error Levels
30
31 // 1 E_ERROR fatal run-time errors
32 // 2 E_WARNING run-time warnings (non fatal errors)
33 // 4 E_PARSE compile-time parse errors
34 // 8 E_NOTICE run-time notices (less serious than warnings)
35 // 16 E_CORE_ERROR fatal errors that occur during PHP's initial startup
36 // 32 E_CORE_WARNING warnings (non fatal errors) that occur during PHP's initial startup
37 // 64 E_COMPILE_ERROR fatal compile-time errors
38 // 128 E_COMPILE_WARNING compile-time warnings (non fatal errors)
39 // 256 E_USER_ERROR user-generated error message
40 // 512 E_USER_WARNING user-generated warning message
41 // 1024 E_USER_NOTICE user-generated notice message
42
43
44
45 function ezxmlrpcErrorHandler ($errno, $errstr, $errfile, $errline)
46 {
47 $ret = new eZXMLRPCResponse();
48 switch($errno) {
49 case 1:
50 case 2:
51 case 4:
52 case 16:
53 case 256:
54 case 512:
55 case 1024:
56 $ret->setError("666","PHP Error [$errno] $errstr in $errfile on $errline");
57 break;
58 default:
59 //$ret->setError("6661","PHP Error [$errno] $errstr in $errfile on line $errline");
60 unset( $ret );
61 return true;
62 break;
63 }
64 $payload =& $ret->payload();
65 Header( "Server: eZ xmlrpc server" );
66 Header( "Content-type: text/xml" );
67 Header( "Content-Length: " . strlen( $payload ) );
68 print( $payload );
69 die();
70 }
71 ?>
eZXMLRPCResponse
Definition: ezxmlrpcresponse.php:50
$ret
$ret
Definition: ezsitemanager/admin/filelist.php:88
ezxmlrpcErrorHandler
ezxmlrpcErrorHandler($errno, $errstr, $errfile, $errline)
Definition: ezxmlrpcerrorhandler.php:45
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.