clean up inline definition of custom exception