ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\Xml\LibXMLException Class Reference

This exception is thrown when the Readers runs into a parsing error. More...

+ Inheritance diagram for Sabre\Xml\LibXMLException:
+ Collaboration diagram for Sabre\Xml\LibXMLException:

Public Member Functions

 __construct (array $errors, $code=null, Exception $previousException=null)
 Creates the exception. More...
 
 getErrors ()
 Returns the LibXML errors. More...
 

Protected Attributes

 $errors
 

Detailed Description

This exception is thrown when the Readers runs into a parsing error.

This exception effectively wraps 1 or more LibXMLError objects.

Author
Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License

Definition at line 17 of file LibXMLException.php.

Constructor & Destructor Documentation

◆ __construct()

Sabre\Xml\LibXMLException::__construct ( array  $errors,
  $code = null,
Exception  $previousException = null 
)

Creates the exception.

You should pass a list of LibXMLError objects in its constructor.

Parameters
LibXMLError[]$errors
int$code
Exception$previousException

Definition at line 35 of file LibXMLException.php.

References $code, and Sabre\Xml\LibXMLException\$errors.

35  {
36 
37  $this->errors = $errors;
38  parent::__construct($errors[0]->message . ' on line ' . $errors[0]->line . ', column ' . $errors[0]->column, $code, $previousException);
39 
40  }
$code
Definition: example_050.php:99

Member Function Documentation

◆ getErrors()

Sabre\Xml\LibXMLException::getErrors ( )

Returns the LibXML errors.

Returns
void

Definition at line 47 of file LibXMLException.php.

References Sabre\Xml\LibXMLException\$errors.

Referenced by Sabre\Xml\ReaderTest\testParseProblem().

47  {
48 
49  return $this->errors;
50 
51  }
+ Here is the caller graph for this function:

Field Documentation

◆ $errors

Sabre\Xml\LibXMLException::$errors
protected

The documentation for this class was generated from the following file: