diff --git a/alib2integrationtest/test-src/testing/TimeoutAqlTest.cpp b/alib2integrationtest/test-src/testing/TimeoutAqlTest.cpp index cd47e920246d1d5891fb66b51a81ce683d128a27..1c3877dd77c17a0ebaf839cc10f7aedeec3a5e2c 100644 --- a/alib2integrationtest/test-src/testing/TimeoutAqlTest.cpp +++ b/alib2integrationtest/test-src/testing/TimeoutAqlTest.cpp @@ -9,6 +9,7 @@ #include <string.h> #include <global/GlobalData.h> +#include <alib/exception> #define PIPE_RD 0 #define PIPE_WR 1 @@ -56,10 +57,10 @@ int aqlTest ( int fd, const ext::vector < std::string > & queries ) { } return environment.getResult ( ); /* 0 = OK */ - } catch ( const std::exception & e ) { - const char * what = e.what ( ); - ssize_t what_len = ( ssize_t ) strlen ( what ); - if ( write ( fd, what, what_len ) != what_len ) + } catch ( const std::exception & ) { + std::ostringstream oss; + alib::ExceptionHandler::handle ( oss ); + if ( write ( fd, oss.str ( ).c_str ( ), oss.str ( ).length ( ) ) != ( ssize_t ) oss.str ( ).length ( ) ) throw std::runtime_error ( "TimeoutAqlTest: write() failure (child to parent communication)" ); return -1; }