Cześć.
Mam taki kod:
// C++ API headers
#include <iostream>
// POSIX API headers
#include <pthread.h>
void *watek(void *fWsk)
{
throw "Wyjątek";
return NULL;
}
int funkcja_a()
{
pthread_t thread1;
try
{
pthread_create(&thread1, NULL, &watek, NULL);
}
catch (const char *fMessage)
{
std::cerr << "Wyjątek: " << fMessage;
}
return 0;
}
int main()
{
funkcja_a();
return 0;
}
Problem w tym, że wyjątek nie jest przechwytywany.