__construct() public method

Creates an Exception signifying a parse error.
public __construct ( string $message, array | integer $attributes = [] )
$message string Error message
$attributes array | integer Attributes of node/token where error occurred (or start line of error -- deprecated)
コード例 #1
0
 /**
  * Constructor!
  *
  * @param string $message (default: "")
  * @param int    $line    (default: -1)
  */
 public function __construct($message = '', $line = -1)
 {
     $message = sprintf('PHP Parse error: %s', $message);
     parent::__construct($message, $line);
 }