using the try catch finally to handle specific errors