Source for file message.class.php
Documentation is available at message.class.php
*@=@=@=@ START LICENSE @=@=@=@*
Copyright or © or Copr. Stéphane TRICHET and Nicolas SOTRON
stephane.t@simpliciweb.net and nicolas.s@simpliciweb.net
This software is a computer program whose purpose is to make a
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software. You can use,
modify and/ or redistribute the software under the terms of the CeCILL
license as circulated by CEA, CNRS and INRIA at the following URL
"http://www.cecill.info".
As a counterpart to the access to the source code and rights to copy,
modify and redistribute granted by the license, users are provided only
with a limited warranty and the software's author, the holder of the
economic rights, and the successive licensors have only limited
In this respect, the user's attention is drawn to the risks associated
with loading, using, modifying and/or developing or reproducing the
software by the user in light of its specific status of free software,
that may mean that it is complicated to manipulate, and that also
therefore means that it is reserved for developers and experienced
professionals having in-depth computer knowledge. Users are therefore
encouraged to load and test the software's suitability as regards their
requirements in conditions enabling the security of their systems and/or
data to be ensured and, more generally, to use and operate it in the
same conditions as regards security.
The fact that you are presently reading this means that you have had
knowledge of the CeCILL license and that you accept its terms.
*@=@=@=@ END LICENSE @=@=@=@*
* @version $Id: message.class.php 804 2008-01-08 17:05:37Z stephanet $
define('NET_ERROR_SILENT', 'S');
define('NET_ERROR_HTML', 'H');
* Type of error : Internal
define('NET_ERROR_INTERNAL', 'I');
* Generate an error loged to the PLICI logs /log
* @param bool $p_as_got_an_error TRUE = log the error, FALSE = do nothing
* @param string $p_error_id
* @return bool $p_as_got_an_error
function onErrorThrow($p_as_got_an_error, $p_error_id)/*, $p_fonction_name , $file_name_or_design_id ,
$error_type = NET_ERROR_HTML, $array_params_for_error = array()) */{
return $p_as_got_an_error;
$current_message_error =
$p_error_id;
// quoi qu'il arrive on met une version courte de l'erreur dans le log
$prefix_msg_error =
"";//"[".date("D M d G:i:s Y")."] "."PLICI[".$_SERVER['HTTP_HOST']."] : ";
$error_msg_to_log =
$prefix_msg_error.
$p_error_id.
"\n";
$line =
"(line: ".
$value['line'].
")";
$function =
$value['function'];
if (isset
($value['args']) &&
is_array($value['args'])) {
foreach($value['args'] as $keyargs =>
$valueargs) {
$error_msg_to_log .=
$prefix_msg_error.
" ".
$line.
" ".
$file.
"\n";
$error_msg_to_log .=
$prefix_msg_error.
" Fct :".
$function.
"\n";
// Si on doit setter une erreur vers l'HTML on le fait ici
$g_object_message =
& $g_object_loader->getMessage();
//echo_net("error, $p_error_id, $current_message_error");
$g_object_message->addError("error", $p_error_id, $p_error_id);
return $p_as_got_an_error;
* Any class wich extend ObjectCached can use a function cache using xRemembered, etc.
* @version $Id: message.class.php 804 2008-01-08 17:05:37Z stephanet $
* Stop the message system
* Constructor, init the requests and objects
* Format the errors messages
* @param string $r_message
* @param array $array_erros
for ($i=
0; $i <
sizeof($array_erros);$i++
) {
$r_message .=
$array_erros[$i];
* Enable Error Message registering
* Disable Error Message registering
* Get the messages during disabling
* Used in import/export to not show errors directly but to show it after
* Return if a message has been encountred
* @param string $current_message_error
function addError($p_type, $p_id, $current_message_error) {
return $current_message_error;
Documentation generated on Tue, 25 Mar 2008 15:35:14 +0100 by phpDocumentor 1.3.2