further improve try...catch generation