support panic handling.