Put a double try loop in the example in order to be able to catch the
errors