Handle headless exception.