#NEWLINE# @ moduledef . method ( 'catch' , name = 'symbol' ) #NEWLINE# def method_catch( self , space , name , block ) : #NEWLINE# #INDENT# if ( block is None ) : #NEWLINE# #INDENT# raise space . error ( space . w_LocalJumpError , 'no block given' ) #NEWLINE# #UNINDENT# from topaz.interpreter import Throw #NEWLINE# with space . getexecutioncontext ( ) . catch_block ( name ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return space . invoke_block ( block , [ ] ) #NEWLINE# #UNINDENT# except Throw as e : #NEWLINE# #INDENT# if ( e . name == name ) : #NEWLINE# #INDENT# return e . w_value #NEWLINE# #UNINDENT# raise