[ACCEPTED]-terminate called after throwing an instance of 'Poco::SystemException'-exception-handling
anyone knows in what code this uncaught 16 exception is caught?
An uncaught exception 15 is—by definition—not caught anywhere.
If 14 an exception cannot be handled, the C++ exception 13 mechanism will call std::terminate()
(see include header 12 <exception>
), which will call a customizable termination 11 handler. On your platform, the standard 10 termination handler prints the output of 9 std::exception::what()
(which Poco's exceptions inherit from). Unfortunately, the 8 way Poco's exceptions are designed, this 7 will not contain any useful information.
There 6 are multiple ways an exception cannot be 5 handled:
- No suitable
catch()
handler is found and the unwinding mechanism exitsmain()
. You can try wrapping yourmain()
code intry...catch
to print the exception'sdisplayText()
. - A function exits with an exception that does not match its exception specification (
... functionname(...) throw(...)
). This will callstd::unexpected()
which in turn will callstd::terminate()
(by default). - An exception is thrown from within a destructor that is called during the unwinding process of another exception. Never throw exceptions in destructors!
- An exception is thrown while trying to create the original exception object. Never throw exceptions in custom exception classes!
When using Poco threads and a thread 4 is terminated by an unhandled exception, Poco 3 will invoke its internal ErrorHandler
and the program 2 will not exit, so I doubt that this is a 1 threading issue.
I was getting the same error. I had used 6 a try catch block in the run function of 5 the Poco::Runnable class. I removed the 4 try catch block from this class and used 3 a derivative of Poco::ErrorHandler class 2 to handle the errors. After this I stopped 1 getting this error.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.