意外异常出现后即使修改unexpect也运行时程序似乎仍然调用了abort是怎么回事

#include<iostream>
#include<exception>
using namespace std;

//测试意外异常
void myUnexpected()
{
    throw bad_exception();
}
void Test() throw(out_of_range,bad_exception)
{
    throw logic_error("i love");
}
int main()
{
    set_unexpected(myUnexpected);
    try {
        Test();
    }
    catch (out_of_range& ex) {
        exit(5);
    }
    catch (bad_exception& ex) {
        cout << "Oop";
    }
}