ProtectTaurusMessageBox

digraph inheritance50149fb9fb { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "ProtectTaurusMessageBox" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="The idea of this class is to be used as a decorator on any method"]; }
class ProtectTaurusMessageBox(title=None, msg=None)[source]

Bases: object

The idea of this class is to be used as a decorator on any method you which to protect against exceptions. The handle of the exception is to display a TaurusMessageBox with the exception information. The optional parameter title gives the window bar a customized title. The optional parameter msg allows you to give a customized message in the dialog. Example:

@ProtectTaurusMessgeBox(title="Error trying to turn the beam on")
def turnBeamOn(device_name):
    d = taurus.Device(device_name)
    d.TurnOn()