Does anyone know in which code this caught exception is caught?
An uncaught exception, by definition, is not caught anywhere.
If the exception cannot be handled, the C ++ exception mechanism will call std::terminate() (see the <exception> header), which will call the custom completion handler. On your platform, the standard print completion handler outputs std::exception::what() (to which Poco exceptions are inherited). Unfortunately, methods for eliminating Poco are developed; this will not contain any useful information.
There are several ways to eliminate the exception:
- No suitable
catch() handler was found, and the promotion mechanism terminates main() . You can try wrapping the main() code in try...catch to print a displayText() exception. - The function terminates with an exception that does not meet the specification of the exception (
... functionname(...) throw(...) ). This will call std::unexpected() , which in turn will call std::terminate() (by default). - The exception is selected from the destructor, which is called during the process of unwinding another exception. Never throw exceptions in destructors!
- When you try to create a source exception object, an exception is thrown. Never throw exceptions in custom exception classes!
When using Poco streams and the thread is interrupted by an unhandled exception, Poco will call its internal ErrorHandler , and the program will not, therefore, I doubt that this is a problem with the streams.
source share