Wire::error PHP Method

error() public method

This method automatically identifies the error as coming from this class. Fatal errors should still throw a WireException (or class derived from it)
public error ( string | array | Wire $text, integer | boolean $flags )
$text string | array | Wire
$flags integer | boolean See Notices::flags or specify TRUE to have the error also logged to errors.txt
    public function error($text, $flags = 0)
    {
        return $this->_notice($text, $flags, 'errors', 'NoticeError');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Record an error message in the error log (errors.txt)
  *
  * Note: Fatal errors should instead throw a WireException.
  *
  * @param string $text
  * @param int|bool $flags Specify boolean true to also display the error interactively (admin only).
  * @return $this
  *
  */
 public function error($text, $flags = 0)
 {
     $flags = $flags === true ? Notice::log : $flags | Notice::logOnly;
     return parent::error($text, $flags);
 }
All Usage Examples Of Wire::error