>>307
これじゃダメなんでしょうか?
すみませんC++よくわかってなくて…

try{
delete p;
}catch(...){
std::cerr << "error!" << std::endl;
}