more robust exception message