try-catch blocks restructured