Hi,

I just wanted to share this, because I couldn't find any messages about this problem on the list.

When running the below code on a x86 machine, the exception is not caught. Instead the program will abort and core dump. On amd64 however this code does works as expected.

I found that compiling libev with the '-fexceptions' flag solves this issue for GCC.

I don't know how other compilers/platforms deal with this.

Kind regards,

David


#include <iostream>
#include "ev++.h"

using namespace std;

void throw_except(ev::timer &w, int revents)
{
        throw int(1);
}

int main()
{
        ev::timer timer1;
        timer1.set<throw_except>();
        timer1.start(0, 0);

        try {
                ev_run(EV_DEFAULT, 0);
        } catch (...) {
                cout << "caught exception" << endl;
        }

        return 0;
}
<<<


_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to