|
Jobbuddy
|
Fonctions membres publiques | |
| __construct (string $message, int $lineno=-1, ?Source $source=null, ?\Throwable $previous=null) | |
| getRawMessage () | |
| getTemplateLine () | |
| setTemplateLine (int $lineno) | |
| getSourceContext () | |
| setSourceContext (?Source $source=null) | |
| guess () | |
| appendMessage ($rawMessage) | |
Twig base exception.
This exception class and its children must only be used when an error occurs during the loading of a template, when a syntax error is detected in a template, or when rendering a template. Other errors must use regular PHP exception classes (like when the template cache directory is not writable for instance).
To help debugging template issues, this class tracks the original template name and line where the error occurred.
Whenever possible, you must set these information (original template name and line number) yourself by passing them to the constructor. If some or all these information are not available from where you throw the exception, then this class will guess them automatically.
| __construct | ( | string | $message, |
| int | $lineno = -1, | ||
| ?Source | $source = null, | ||
| ?\Throwable | $previous = null ) |
Constructor.
By default, automatic guessing is enabled.
| string | $message | The error message |
| int | $lineno | The template line where the error occurred |
| Source | null | $source | The source context where the error occurred |