Exception for failed element parsers.
The exception will display the exact location(s) where the error occured with some extra description of what went wrong.
Source for this file: /Template/src/exceptions/source_to_tst_parser_exception.php
Exception | --ezcBaseException | --ezcTemplateException | --ezcTemplateSourceToTstParserException
Version: | //autogen// |
public array |
$elements
Array of elements which should be used to extract failed code. Each element needs to have the property $startCursor and $endCursor. |
public string |
$errorDetails
A more detailed error message which can for instance give hints to the end-user why it failed. |
public string |
$errorMessage
The one-liner error message. |
public ezcTemplateSource |
$source
The source code object which caused the error. |
From ezcBaseException | |
---|---|
public |
ezcBaseException::$originalMessage
|
From Exception (Internal Class) | |
protected |
$code
|
protected |
$file
|
protected |
$line
|
protected |
$message
|
private |
$previous
|
private |
$string
|
private |
$trace
|
public ezcTemplateSourceToTstParserException |
__construct(
$parser
, $cursor
, $errorMessage
, [ $errorDetails
= ""] )
Initialises the exception with the failing elements, parser, source code and error messages. |
public string |
getErrorMessage(
)
Generates the error message from member variables and returns it. |
From ezcTemplateException | |
---|---|
public ezcTemplateException |
ezcTemplateException::__construct()
Constructs a new ezcTemplateException with error message $message. |
From ezcBaseException | |
public ezcBaseException |
ezcBaseException::__construct()
Constructs a new ezcBaseException with $message |
From Exception (Internal Class) | |
public Exception |
constructor __construct ( [$message = ], [$code = ], [$previous = ] )
|
public void |
getCode ( )
|
public void |
getFile ( )
|
public void |
getLine ( )
|
public void |
getMessage ( )
|
public void |
getPrevious ( )
|
public void |
getTrace ( )
|
public void |
getTraceAsString ( )
|
public void |
__clone ( )
|
public void |
__toString ( )
|
Initialises the exception with the failing elements, parser, source code and error messages.
Name | Type | Description |
---|---|---|
$parser |
ezcTemplateSourceToTstParser | The parser which was used when error occured, can be null. |
$cursor |
ezcTemplateCursor | The cursor pointing to the error. |
$errorMessage |
string | The error message. |
$errorDetails |
string | Extra details for error. |
Method | Description |
---|---|
ezcTemplateException::__construct() |
Constructs a new ezcTemplateException with error message $message. |
Generates the error message from member variables and returns it.