calc handles exceptions