Hello,
I have a class that I developed using exceptions, but every time I call a function and it generates an exception, the program appears to hang. Closer investigation shows that the throw command has a long list of calls that eventually calls exit().
throw command -> __cxa_throw() -> std::terminate() -> __cxabiv1::__terminate() -> abort() -> _exit()
I have used this same method numerous times before so I'm pretty confident that the problem is not in the implementation, but I'm struggling with locating the root cause. Any suggestions?
Source of the exception (_connectTcp()):
status = nxd_tcp_client_socket_connect(
socket_ptr,
&server_addr,
port,
wait_option);
if( status != NX_SUCCESS)
{
throw ERRORS::TCP_SOCKET_BIND_ERROR;
}
Try/Catch Block
try
{
_connectTcp( socket_ptr, ip_addr, port, connect_wait);
}
catch( ERRORS err)
{
error = err;
}
Copy of stack:
_exit() at _exit.c:19 0x60040b36
abort() at 0x60034da4
__cxxabiv1::__terminate() at 0x60035604
std::terminate() at 0x60035612
__cxa_throw() at 0x60035752
RtController_Ethernet::_connectTcp() at RTController_Ethernet.cpp:1,063 0x6000945c