class PVGeo._helpers.errors.ErrorObserver[source]

Bases: object

A class for catching errors when processing on a VTK pipeline. The AlgorithmBase class handles setting up this observer on initialization.


>>> import PVGeo
>>> # Only use this observer on sub classes of the AlgorithmBase:
>>> f = PVGeo.AlgorithmBase()
>>> f.Update()
>>> if f.ErrorOccurred():
>>>    print(f.ErrorMessage())
ERROR: ...

Get the last set error message

Returns:the last set error message
Return type:str

Ask self if an error has occured


Make this an observer of an algorithm


class PVGeo._helpers.errors.HiddenPrints[source]

Bases: object


class PVGeo._helpers.errors.PVGeoError(message)[source]

Bases: Exception

This is a custom error class for handling errors when proccessing on the VTK pipeline. It makes the error messages easy to decipher in ParaView and cleans the messages when used in Python outside of ParaView. When on the VTK pipeline, errors aren’t really raised but passed over and printed to the console. This class makes decipher the error streams a whole lot easier for human eyes.

static CleanMessage(message)[source]
QUALIFIER_L = '@@@@PVGeoError ---> '
QUALIFIER_R = ' <--- PVGeoError@@@@'
SEARCHER = re.compile('@@@@PVGeoError --->.+?<--- PVGeoError@@@@', re.MULTILINE|re.DOTALL)