Skip to content

Commit

Permalink
Minor adjustment. JIRA CXX-11288
Browse files Browse the repository at this point in the history
  • Loading branch information
vakatov authored Apr 13, 2020
1 parent 8f4485e commit 2497ae3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/ch_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ Again, the `(101.1)` indicates the error code (defined in the module's `error_co

Knowing exactly where an exception first occurs can be very useful for debugging purposes. [CException](#ch_debug.CException) class has this functionality built in, so it is highly recommended to use exceptions derived from it. In addition to this a set of **`THROW_TRACE_*()`** macros defined in the NCBI C++ Toolkit combine exception handling with [trace](ch_core.html#ch_core._TRACE) mechanisms to provide such information.

The first of these macros, **`THROW_TRACE_ARGS(class_name, ...)`**, instantiates an object of type **`class_name`** using the remaining arguments (optional) to initialize it. The object is then printed along with the current location (file, line number, function).
The first of these macros, **`THROW_TRACE_ARGS(class_name, ...)`**, instantiates an object of type **`class_name`** using the remaining arguments (optional) to initialize it. The object is then printed along with the current location (file, line number, function), and thrown.

- If the object has `what()` method (is an exception), the method is used for printing.

Expand All @@ -1333,7 +1333,7 @@ Below are a few examples of the macros and the output they produce.

- `THROW_TRACE_SIMPLE(CNonPrintableClass());`<br/>T0 "test.cpp", line 123: Trace: CTestApp::Run() - CNonPrintableClass()

There is also a set of old style **`THROW*_TRACE`** macros:
There is also a set of old style **`THROW*_TRACE`** macros (NOTE: please do not use them if possible!):

- **`THROW0_TRACE(exception_object)`**

Expand Down

0 comments on commit 2497ae3

Please sign in to comment.