]>
src.bluestatic.org Git - viewsvn.git/blob - includes/imaginary.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # ViewSVN [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Mimics functions that will later become the language
24 * independence system and error system
30 * Imaginary class that does error reporting and language
39 * Mimics the error reporting function
45 * @return string Error
47 function error($error)
51 // adapted from PEAR/PHP_Compat
54 $backtrace = debug_backtrace();
57 for ($i = 1; $i < sizeof($backtrace); $i++
)
59 $call = $backtrace["$i"];
61 $function = (isset($call['class'])) ? $call['class'] . '.' . $call['function'] : $call['function'];
64 if (isset($call['args']))
66 $params = implode(', ', $call['args']);
69 $calls[] = sprintf('#%d : %s(%s) <strong>[%s:%s]</strong>', $i, $function, $params, $call['file'], $call['line']);
72 echo implode('<br />', $calls) . '<br />';
75 trigger_error($error, E_USER_ERROR);
79 /*=====================================================================*\
80 || ###################################################################
83 || ###################################################################
84 \*=====================================================================*/