Home
last modified time | relevance | path

Searched refs:error (Results 1 – 25 of 34) sorted by relevance

12

/PHP-Parser/test/PhpParser/
H A DErrorTest.php11 $error = new Error('Some error', $attributes);
16 $this->assertSame(11, $error->getEndLine());
19 return $error;
26 $error->setRawMessage('Some other error');
29 $error->setStartLine(15);
35 $error = new Error('Some error');
44 $error = new Error('Some error', [
80 $error->getStartColumn('');
86 $error->getEndColumn('');
96 $error = new Error('Some error', [
[all …]
H A DCodeParsingTest.php37 foreach ($errors->getErrors() as $error) {
38 $output .= $this->formatErrorMessage($error, $code) . "\n";
/PHP-Parser/doc/component/
H A DError_handling.markdown4 …ng or analysis are represented using the `PhpParser\Error` exception class. In addition to an error
5 message, an error can also store additional information about the location the error occurred at.
7 …nformation is available depends on the origin of the error. At a minimum the start line of the err…
14 location of an error cannot always be determined. The methods for retrieving column information als…
15 the source code of the parsed file. An example for printing an error:
34 The error behavior of the parser (and other components) is controlled by an `ErrorHandler`. Wheneve…
35 encountered, `ErrorHandler::handleError()` is invoked. The default error handling strategy is `Erro…
36 which will immediately throw when an error is encountered.
48 foreach ($errorHandler->getErrors() as $error) {
49 // $error is an ordinary PhpParser\Error
[all …]
H A DConstant_expression_evaluation.markdown27 // or an error occurred during evaluation
35 differ in error behavior. `evaluateDirectly()` will evaluate the expression as PHP would, including
/PHP-Parser/bin/
H A Dphp-parse59 foreach ($errorHandler->getErrors() as $error) {
60 $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
69 } catch (PhpParser\Error $error) {
70 $message = formatErrorMessage($error, $code, $attributes['with-column-info']);
104 function showHelp($error = '') { argument
105 if ($error) {
106 fwrite(STDERR, $error . "\n\n");
108 fwrite($error ? STDERR : STDOUT, <<<'OUTPUT'
134 exit($error ? 1 : 0);
/PHP-Parser/test/code/parser/scalar/
H A DnumberSeparators.test24 Syntax error, unexpected T_STRING from 13:4 to 13:4
25 Syntax error, unexpected T_STRING from 14:2 to 14:4
26 Syntax error, unexpected T_STRING from 15:2 to 15:2
27 Syntax error, unexpected T_STRING from 16:3 to 16:4
28 Syntax error, unexpected T_STRING from 17:2 to 17:6
29 Syntax error, unexpected T_STRING from 18:2 to 18:6
30 Syntax error, unexpected T_STRING from 19:2 to 19:4
31 Syntax error, unexpected T_STRING from 20:2 to 20:4
/PHP-Parser/lib/PhpParser/
H A DErrorHandler.php9 * @param Error $error The error that needs to be handled
11 public function handleError(Error $error): void; argument
H A DParserAbstract.php416 protected function emitError(Error $error): void { argument
417 $this->errorHandler->handleError($error);
741 } catch (Error $error) {
742 $this->emitError($error);
1022 } catch (Error $error) {
1023 $error->setAttributes($this->getAttributesAt($modifierPos));
1024 $this->emitError($error);
1032 } catch (Error $error) {
1033 $error->setAttributes($this->getAttributesAt($modifierPos));
1034 $this->emitError($error);
/PHP-Parser/lib/PhpParser/ErrorHandler/
H A DThrowing.php14 public function handleError(Error $error): void { argument
15 throw $error;
H A DCollecting.php17 public function handleError(Error $error): void { argument
18 $this->errors[] = $error;
/PHP-Parser/test/code/parser/errorHandling/
H A Drecovery.test9 Syntax error, unexpected T_STRING from 4:1 to 4:3
10 Syntax error, unexpected T_STRING from 5:1 to 5:3
11 Syntax error, unexpected EOF from 5:6 to 5:6
48 Syntax error, unexpected T_STRING from 4:1 to 4:3
120 Syntax error, unexpected ';' from 3:5 to 3:5
141 Syntax error, unexpected '}' from 4:1 to 4:1
214 Syntax error, unexpected ')' from 4:8 to 4:8
266 Syntax error, unexpected EOF from 8:12 to 8:12
321 Syntax error, unexpected EOF from 2:6 to 2:6
338 Syntax error, unexpected EOF from 2:4 to 2:4
[all …]
H A DeofError.test5 Syntax error, unexpected EOF from 1:10 to 1:10
18 Syntax error, unexpected EOF from 1:20 to 1:20
H A DlexerErrors.test143 Syntax error, unexpected EOF from 6:2 to 6:2
/PHP-Parser/test/code/parser/expr/
H A DexprInIsset.test6 // This is illegal, but not a syntax error.
39 0: // This is illegal, but not a syntax error.
H A DnewWithoutClass.test6 Syntax error, unexpected ';' from 2:4 to 2:4
H A DexprInList.test7 // This is illegal, but not a syntax error.
65 0: // This is illegal, but not a syntax error.
/PHP-Parser/test/code/parser/stmt/namespace/
H A DgroupUseErrors.test8 Syntax error, unexpected T_USE, expecting ';' from 4:1 to 4:3
49 Syntax error, unexpected '{', expecting ';' from 3:9 to 3:9
90 Syntax error, unexpected T_NAME_FULLY_QUALIFIED, expecting T_STRING or T_FUNCTION or T_CONST or T_N…
H A DinvalidName.test45 Syntax error, unexpected T_STATIC, expecting T_STRING from 1:16 to 1:21
/PHP-Parser/test/code/parser/stmt/
H A DhaltCompilerInvalidSyntax.test6 Syntax error, unexpected EOF, expecting ';' from 2:18 to 2:18
/PHP-Parser/lib/PhpParser/Lexer/
H A DEmulative.php91 foreach ($errors as $error) {
92 $errorHandler->handleError($error);
198 foreach ($errors as $error) {
199 $attrs = $error->getAttributes();
223 $error->setAttributes($attrs);
/PHP-Parser/test/code/parser/expr/uvs/
H A DglobalNonSimpleVarError.test6 Syntax error, unexpected T_OBJECT_OPERATOR, expecting ';' from 2:13 to 2:14
/PHP-Parser/test/code/parser/stmt/class/
H A DreadonlyAsClassName.test6 Syntax error, unexpected T_READONLY, expecting T_STRING from 2:7 to 2:14
/PHP-Parser/
H A DUPGRADE-3.0.md8 * There have been significant changes to the error recovery implementation. This may affect you,
9 if you used the error recovery mode or have a custom lexer implementation.
39 ### Changes to error recovery mode
41 Previously, error recovery mode was enabled by setting the `throwOnError` option to `false` when
73 #### Multiple parser fallback in error recovery mode
77 parsing never throws in error recovery mode, the result from the first parser will always be
82 parser will be able to recover from the error in both cases. For this reason, this change will
128 This means that certain error conditions are no longer checked for manually constructed nodes.
/PHP-Parser/test/PhpParser/Lexer/
H A DEmulativeTest.php164 $error = $errors[0];
165 $this->assertSame('Unexpected null byte', $error->getRawMessage());
167 $attrs = $error->getAttributes();
/PHP-Parser/test_old/
H A Drun.php10 function showHelp($error) { argument
11 die($error . "\n\n" .

Completed in 68 milliseconds

12