Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

About exceptions: Is try, catch and thow supported?

I would like to use try-catch statements, but it does not seems to work for me. I work with Quartus II 11.0sp1 and nios II (the fpga includes a vic).

When I debug what happens in my throw statement it seems as if I get another exception during the call of "_Unwind_RaiseException" in _cxxabiv1::__cxa_throw in the gnu file eh_throw.cc.

My code setup is very simple: static int catched = 0; try { throw 20; } catch (...) { catched++; } Any one have a hint for me?

15 Replies