C++ exceptions
Posted: Mon Aug 18, 2008 2:58 pm
Hi!
I just tried to use C++ exceptions in one of my userland applications and I have a little problem...
First of all a few words about the environment. I'm using my default linux GCC and G++ to compile all executables of my OS. The command line parameters for the compiler are the following:
I'm not using -fno-exceptions or -no-rtti anywhere. I've a previously created libstdc++.a that runs on my OS and I'm linking this file statically with the C++ executables that runs on my OS.
I just created a little application and I called a function that throws an exception. I'm sure that the exception is thrown because the application exits in the middle of the execution. The funny thing is that the call to the function that throws the exception is surrounded with a try { } catch ( ... ) { print() } block.
I'd like to ask some help in finding out why the exception handler catch is not reached and the exception is handled like a non-caught exception?
Thanks, c0x
I just tried to use C++ exceptions in one of my userland applications and I have a little problem...
First of all a few words about the environment. I'm using my default linux GCC and G++ to compile all executables of my OS. The command line parameters for the compiler are the following:
Code: Select all
-c -march=i686 -O2 -Wall -m32 -fno-strict-aliasing -nostdinc -nodefaultlibs -nostdlib -fno-builtin
I just created a little application and I called a function that throws an exception. I'm sure that the exception is thrown because the application exits in the middle of the execution. The funny thing is that the call to the function that throws the exception is surrounded with a try { } catch ( ... ) { print() } block.
I'd like to ask some help in finding out why the exception handler catch is not reached and the exception is handled like a non-caught exception?
Thanks, c0x