异常处理

1.抛出异常

throw logic_error("illegal future_value parameter");

2.捕获异常

try
{
    //code....
}
catch (logic_error& e)
{
    //bandler....      
}

 

posted on 2015-12-30 16:59  抽筋的马  阅读(99)  评论(0编辑  收藏  举报

导航