should be a ValueError, not a general Exception.