static Node getExceptionHandler ( Node n ) { for ( Node cur = n ; ! cur . isScript ( ) && ! cur . isFunction ( ) ; cur = cur . getParent ( ) ) { Node catchNode = getCatchHandlerForBlock ( cur ) ; if ( catchNode != null ) { return catchNode ; } } return null ; }
Get the TRY block with a CATCH that would be run if n throws an exception .