errors

ErrorObserver

class PVGeo._helpers.errors.ErrorObserver[source]

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

Example

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

Get the last set error message

Returns:the last set error message
Return type:str
ErrorOccurred()[source]

Ask self if an error has occured

MakeObserver(algorithm)[source]

Make this an observer of an algorithm

PVGeoError

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

Bases: exceptions.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 = <_sre.SRE_Pattern object at 0x3550c60>