Catches Error thrown from cmd.execute();