pymel.core.language.Catch

digraph inheritance7109e1a8e1 {
rankdir=TB;
ranksep=0.15;
nodesep=0.15;
size="8.0, 12.0";
  "Catch" [fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,URL="#pymel.core.language.Catch",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8];
}

class Catch

Reproduces the behavior of the mel command of the same name. if writing pymel scripts from scratch, you should use the try/except structure. This command is provided for python scripts generated by py2mel. stores the result of the function in catch.result.

>>> if not catch( lambda: myFunc( "somearg" ) ):
...    result = catch.result
...    print "succeeded:", result
reset()

Previous topic

pymel.core.language.waitCursor

Next topic

pymel.core.language.Env

Core

Core Modules

Other Modules

This Page