Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#3999 closed enhancement (duplicate)

Include file and line number in exception message

Reported by: stephen Owned by:
Priority: medium Milestone: Kea1.0-beta
Component: Unclassified 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


At several points in the code, we catch an exception and log an error whose text includes the exception message. The problem is that this text may not be sufficient to identify the source of the exception: sometimes the exception text is a system error message, and there are multiple places in the code where a call to a system function could return that error.

The isc::Exception class already stores the file and line number where the the exception was generated: this information should be output when the exception message is logged. To avoid extensive modifications to the code, it is suggested that the "what()" method of isc::Exception is modified to return text comprising the file, line number and exception message. (The method getMessage() is already present in the class to return the unadorned message text.)


Change History (2)

comment:1 Changed 5 years ago by hschempf

  • Milestone changed from Kea-proposed to Kea1.0
  • Resolution set to duplicate
  • Status changed from new to closed

Resolving as duplicate per team meeting on Aug 26; already done as part of #4000.

comment:2 Changed 4 years ago by tomek

  • Milestone changed from Kea1.0 to Kea1.0-beta

Milestone renamed

Note: See TracTickets for help on using tickets.