Assert instead of throwing exception