Opened 4 years ago

Last modified 4 years ago

#4087 new task

Replace use of exit(-1) with new isc::FatalException class which can propagate outward

Reported by: tmark Owned by:
Priority: medium Milestone: Outstanding Tasks
Component: database-all Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


During work on #3780, it came to light that exception catching currently in place prohibits readily propagating an exception upward. In order to meet scheduling pressure, that ticket was solved temporarily by calling exit(-1).

This ticket calls for the implementation a new exception class, isc::FatalException? which derived from neither isc::Exception nor std::exception, such that "catch(...)" blocks can be modified as follows:

catch (const isc::FatalException&) {
catch (...) {

Thus allowing the exception to propagate upward unless explicitly caught. Once this is in place, the call to exit() in MySqlLeaseMgr::checkError() and PgSqlLeaseMgr::checkStatementError() can be replaced with throws of the new exception. The servers' main() function will need to be modified to catch them.

I've attached an email exchange on the topic for background.


Attachments (1)

Re_ [kea-dev] thoughts on #3780.txt (5.4 KB) - added by tmark 4 years ago.
Background email

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by tmark

Background email

comment:1 Changed 4 years ago by hschempf

  • Milestone changed from Kea-proposed to DHCP Outstanding Tasks

per team meeting oct 28, move to outstanding

comment:2 Changed 4 years ago by tomek

  • Milestone changed from DHCP Outstanding Tasks to Outstanding Tasks

Milestone renamed

Note: See TracTickets for help on using tickets.