bryancall commented on code in PR #13733:
URL: https://github.com/apache/trafficserver/pull/13733#discussion_r4301706938


##########
src/traffic_server/traffic_server.cc:
##########
@@ -2546,6 +2549,12 @@ main(int /* argc ATS_UNUSED */, const char **argv)
     std::exit(1);
   }
 #endif
+} catch (std::exception const &ex) {

Review Comment:
   You were right, thanks. The catch in main threw away the throw site and 
missed the event threads. I took it out and added a `std::set_terminate` 
handler at the top of `main()` instead. It prints the exception type and 
message, then calls `ink_abort()`, so the crash log and the core still fire 
with the stack intact.
   
   I checked it by throwing from main and from an ET_NET thread with a 
temporary patch. Both cores still show the function that threw, just below the 
handler. The command line tools keep the catch in main, now each returning its 
own documented error code.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to