]>
src.bluestatic.org Git - bugdar.git/blob - includes/class_error.php
2 /*=====================================================================*\
3 || ################################################################### ||
4 || # BugStrike [#]version[#]
5 || # --------------------------------------------------------------- # ||
6 || # Copyright ©2002-[#]year[#] by Iris Studios, Inc. All Rights Reserved. # ||
7 || # This file may not be reproduced in any way without permission. # ||
8 || # --------------------------------------------------------------- # ||
9 || # User License Agreement at http://www.iris-studios.com/license/ # ||
10 || ################################################################### ||
11 \*=====================================================================*/
18 function throw($text = '')
22 if (is_array($this->phrase
) AND empty($this->process
))
24 trigger_error('Error::phrase is an array so please use Error::construct() to prepare it', E_USER_ERROR
);
27 if (empty($this->process
))
29 $this->process
= phrase($this->phrase
);;
32 $this->process
= (($text) ? $text : $this->process
);
34 $errormessage = $this->process
;
36 eval('$bugsys->template->flush("' . $bugsys->template
->fetch('std_error') . '");');
42 if (!is_array($this->phrase
))
44 trigger_error('Error::construct() requires Error::phrase to be an array', E_USER_ERROR
);
47 if (count($this->phrase
) < 1)
49 trigger_error('Error::phrase needs to have one or more elements to be an array', E_USER_ERROR
);
52 $this->process
= "\n\n<ol style=\"list-style-type: decimal\">";
53 foreach ($this->phrase
AS $phrase)
55 $this->process
.= "\n\t<li>" . phrase($phrase) . "</li>";
57 $this->process
.= "\n</ol>";
60 function throw_permission()
62 $this->phrase
= 'error_no_permission';
67 /*=====================================================================*\
68 || ###################################################################
71 || ###################################################################
72 \*=====================================================================*/