Fix the exception handling in the install tool (see #7259)