Closed
Description
CPPRest compiled on OSX exhibits a problem catching exceptions properly :
try
{
json::value::parse("some badly formatted JSON");
}
catch( const json::json_exception& e )
{
cout << "json::json_exception caught" << endl;
}
catch( const std::exception& e )
{
cout << "std::exception caught" << endl;
}
Following code displays "std::exception caught" on OSX. This really should display "json::json_exception caught", instead. I suspect this is caused by known Apple GCC issue when shared libraries are not built using RTTI. See following StackOverflow article :
Polymorphically catching an exception in a -fno-rtti shared library on Mac OS X
(CPPRest 2.6.0, OSX Yosemite, XCode 6.4)
Metadata
Metadata
Assignees
Labels
No labels