xml.ErrorLog

An xml.ErrorLog class represents all errors reported during the validation process of the current job.

class xml.ErrorLog

Proper instances of this class will be created within RaptorXML only, instantiation from script code will throw a NotImplementedError exception.

Attributes

xml.ErrorLog.errors

Returns an iterator of xml.Error objects for each error reported during the validation process of the current job.

xml.ErrorLog.inconsistencies

Returns an iterator of xml.Error objects for each inconsistency reported during the validation process of the current job.

xml.ErrorLog.text

Returns the textual representation of the error log as a string.

xml.ErrorLog.warnings

Returns an iterator of xml.Error objects for each warning reported during the validation process of the current job.

Methods

xml.ErrorLog.append(Error error)

Appends the given error to this error log. Errors of type xml.ErrorType.ERROR will cause the result of the current validation job to be set to ‘Failed’. If the error limit is reached, a RuntimeError will be raised.

xml.ErrorLog.clear()

Removes any errors, warnings, etc. from the error log.

xml.ErrorLog.extend(ErrorLog error_log)

Appends the errors in given error log to this error log. Errors of type xml.ErrorType.ERROR will cause the result of the current validation job to be set to ‘Failed’. If the error limit is reached, a RuntimeError will be raised.

xml.ErrorLog.has_errors()

Returns True if errors have been reported during the validation process of the current job.

xml.ErrorLog.has_inconsistencies()

Returns True if inconsistencies have been reported during the validation process of the current job.

xml.ErrorLog.has_warnings()

Returns True if warnings have been reported during the validation process of the current job.

xml.ErrorLog.is_error_limit_reached()

Returns True if the internal limit for errors has been reached.

xml.ErrorLog.is_inconsistencies_limit_exceeded()

Returns True if the internal limit for inconsistencies has been exceeded.

xml.ErrorLog.is_valid()

Returns True if no errors have been reported during the validation process of the current job.

xml.ErrorLog.is_warning_limit_exceeded()

Returns True if the internal limit for warnings has been exceeded.

xml.ErrorLog.report(error)

Appends the given error(s) to this error log. Errors of type xml.ErrorType.ERROR will cause the result of the current validation job to be set to ‘Failed’. If the error limit is reached, a RuntimeError will be raised.

xml.ErrorLog.stopped_due_to_errors()

Returns True if the processing was stopped prematurely. This can be caused by fatal errors or by reaching the error limit.

Special methods

__bool__, __eq__, __ge__, __gt__, __iter__, __le__, __len__, __lt__, __ne__