func init if(not isdef("ExceptionMethod")) this.setfield('ex', 'ex' + this.id) end end func doTry(data) dt = data blk.println('try {').inc() event("onTry", dt) if(isdef("ExceptionMethod")) blk.dec().println('} catch {').inc() else blk.dec().println('} catch(Exception ', this.ex, ') {').inc() event("onCatch", this.ex + '.' + this.props("ExceptionMethod").value) end blk.dec().println('}') end