Category : exception

While reading the section about exception handling and the compiler flag -fno-exceptions in the gcc manual, I came across the following lines: Exception handling overhead can be measured in the size of the executable binary, and varies with the capabilities of the underlying operating system and specific configuration of the C++ compiler. On recent hardware ..

Read more

So I’ve written a small C++ class as follows: class bad_hmean : public std::logic_error { const char *nature_; char *what_; public: bad_hmean(const char *fname); ~bad_hmean() { delete[] what_; } const char *what() { return what_; } }; inline bad_hmean::bad_hmean(const char *fname):nature_("BAD HARMONIC MEAN VALUES"), std::logic_error("BAD HARMONIC MEAN VALUES") { int len = strlen(fname) + strlen(nature_)+3; ..

Read more

I’m using make_fcontext and jump_fcontext from boost context to achieve userspace context switching. I use another library to catch and report application crashes. I found these 2 does not work together on Windows. The crash library calls SetUnhandledExceptionFilter during startup time to setup an exception handler to catch unhandled exceptions from the process. It then ..

Read more