Typescript Try Catch Exception Handling Explained Java