C++ exception of RPi

Daisuke Aoyama aoyama at peach.ne.jp
Sun Jan 18 16:08:53 UTC 2015


I've written example of C++ exception since just boot up r276981.
Try to compile by "clang++ sample.cc".
If your /lib/libcxxrt.so.1 is not affected, you can get a result like this:

# ./a.out
catch: 10

Otherwise,

# ./a.out
pid 653 (a.out), uid 0: exited on signal 6 (core dumped)
Abort trap (core dumped)

sample.cc:
----------------------------------------------------------------------
#include <iostream>
using namespace std;

int main()
{
        try{
                throw 10;
        } catch (int e) {
                cout << "catch: " << e << endl;
        }
}
----------------------------------------------------------------------

Regards,
-- 
Daisuke Aoyama
 


More information about the freebsd-arm mailing list