Ошибка с перехватом std :: runtime_error как std :: exception

у нас забавная проблема с try catch и std :: runtime_error. Может ли кто-нибудь объяснить мне, почему это возвращает «Неизвестная ошибка» в качестве вывода? Большое спасибо за помощь!

#include "stdafx.h"
#include <iostream>
#include <stdexcept>

int magicCode()
{
    throw std::runtime_error("FunnyError");
}

int funnyCatch()
{
    try{
        magicCode();
    } catch (std::exception& e) {
        throw e;
    }

}

int _tmain(int argc, _TCHAR* argv[])
{
    try
    {
        funnyCatch();
    }
    catch (std::exception& e)
    {
        std::cout << e.what();
    }
 return 0;
}
7
задан BlueTrin 23 September 2010 в 13:32
поделиться