function cmfcClassesCoreStandAlone::raiseError in Calendar Systems 6
Same name and namespace in other branches
- 8 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
- 8.2 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
- 6.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
- 7.3 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
- 7 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
- 7.2 calendar/lib/classesCore.class.inc.php \cmfcClassesCoreStandAlone::raiseError()
raise an error @example <code> return $this->raiseError('', CMF_Language_Error_Unknown_Short_Name, * CMF_ERROR_RETURN,NULL, * array('shortName'=>$shortName) * ); </code>
@access private
Parameters
string $msg Error message:
int $code Error code:
File
- calendar/
lib/ classesCore.class.inc.php, line 311
Class
- cmfcClassesCoreStandAlone
- all cmf classes inherit from this class
Code
function raiseError($message = null, $code = null, $mode = null, $options = null, $userinfo = null, $error_class = null, $skipmsg = false) {
if (isset($this->_messagesValue[$code]) && empty($message)) {
$message = $this->_messagesValue[$code];
}
if (is_array($userinfo) && !empty($message)) {
if (is_array($userinfo)) {
foreach ($userinfo as $key => $value) {
$replacements['%' . $key . '%'] = $value;
}
}
$message = cmfcString::replaceVariables($replacements, $message);
}
return cmfcExceptionStandAlone::raiseError($message, $code, $mode, $options, $userinfo, $error_class, $skipmsg);
}