error() public method

Creates a new error log.
public error ( string $msg = '', string $str = '', integer $pos, integer $code ) : void
$msg string The error message.
$str string The character that produced the error.
$pos integer The position of the character.
$code integer The code of the error.
return void
示例#1
0
 /**
  * @expectedException SqlParser\Exceptions\LexerException
  * @expectedExceptionMessage strict error
  * @expectedExceptionCode 4
  */
 public function testErrorStrict()
 {
     $lexer = new Lexer('');
     $lexer->strict = true;
     $lexer->error(__('strict error'), 'foo', 1, 4);
 }