HCOLL-167 simplified the exception throwing code