handle exception for undefined package