/** * overloads class.phpmailer's SetError() method so that we can log errors in sugarcrm.log * */ function SetError($msg) { $GLOBALS['log']->fatal("SugarPHPMailer encountered an error: {$msg}"); parent::SetError($msg); }
protected function SetError($msg) { if (preg_match("/^([^#]*)#([^#]+)#(.*)\$/", $msg, $m)) { $arg = null; if ($m[1] != '') { $arg = $m[1]; } if ($m[3] != '') { $arg = $m[3]; } if (strpos($m[2], 'WARNING:') !== false) { $locale = 'jelix~errors.mail.' . substr($m[2], 8); if ($arg !== null) { parent::SetError(jLocale::get($locale, $arg, $this->lang, $this->CharSet)); } else { parent::SetError(jLocale::get($locale, array(), $this->lang, $this->CharSet)); } return; } $locale = 'jelix~errors.mail.' . $m[2]; if ($arg !== null) { throw new jException($locale, $arg, 1, $this->lang, $this->CharSet); } else { throw new jException($locale, array(), 1, $this->lang, $this->CharSet); } } else { throw new Exception($msg); } }
public function SetError($msg) { parent::SetError($msg); $class = get_class($this); $GLOBALS["log"]->fatal("{$class} encountered an error: {$this->ErrorInfo}"); }
function SetError($msg) { global $modx; $modx->config['send_errormail'] = '0'; $modx->logEvent(0, 3, $msg, 'phpmailer'); return parent::SetError($msg); }
/** * Adds the error message to the error container. * @access protected * @return void */ public function setError($msg) { $this->_errors[] = JText::_($msg); return parent::SetError($msg); }
/** * overloads class.phpmailer's SetError() method so that we can log errors in sugarcrm.log * * @param string $msg */ function SetError($msg) { Log::fatal("SugarPHPMailer encountered an error: {$msg}"); parent::SetError($msg); }