throw exception at top level of packages