You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+17-11Lines changed: 17 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
# v1.0.0
34
34
35
35
Major changes:
36
-
- Overhauled how the fromcurrentexception system and `CPPTRACE_TRY`/`CPPTRACE_CATCH` macros work. They now check the
36
+
- Overhauled how the from-current-exception system and `CPPTRACE_TRY`/`CPPTRACE_CATCH` macros work. They now check the
37
37
thrown exception type against the type the catch accepts to decide whether or not to collect a trace. This eliminates
38
38
the need for The `TRYZ`/`CATCHZ` variants of the macros as now the normal macro is equally zero-overhead. As such, the
39
39
`Z` variants have been removed.
@@ -45,7 +45,8 @@ Breaking changes:
45
45
> **Details**
46
46
>
47
47
> Author's note: I apologize for this non-trivial breaking change, however, it allows for a much improved
48
-
> implementation of the from current exception system and the impact should be [minimal for most codebases](https://github.com/search?type=code&q=%2F%5CbCPPTRACE_CATCH_ALT%5Cb%2F+language%3Ac%2B%2B+-is%3Afork+-repo%3Ajeremy-rifkin%2Fcpptrace+-path%3Afrom_current.hpp).
48
+
> implementation of the from-current-exception system. The impact should be [very minimal](https://github.com/search?type=code&q=%2F%5CbCPPTRACE_CATCH_ALT%5Cb%2F+language%3Ac%2B%2B+-is%3Afork+-repo%3Ajeremy-rifkin%2Fcpptrace+-path%3Afrom_current.hpp)
49
+
> for most codebases.
49
50
>
50
51
> Transitioning to `cpptrace::try_catch` is straightforward:
51
52
> <table>
@@ -71,7 +72,7 @@ Breaking changes:
71
72
> } CPPTRACE_CATCH_ALT(const std::exception& e) {
72
73
> handle_exception(e);
73
74
> } CPPTRACE_CATCH_ALT(...) {
74
-
> handle_unknown_exception(e);
75
+
> handle_unknown_exception();
75
76
> }
76
77
> ```
77
78
@@ -90,7 +91,7 @@ Breaking changes:
90
91
> handle_exception(e);
91
92
> },
92
93
> [&] () { // `catch(...)`
93
-
> handle_unknown_exception(e);
94
+
> handle_unknown_exception();
94
95
> }
95
96
> );
96
97
> ```
@@ -100,30 +101,31 @@ Breaking changes:
100
101
> </tbody>
101
102
> </table>
102
103
>
103
-
> Please note as well that code such as the following, which was valid before, will still compile now. The catch
104
-
> handler will work but it won't receive a correct current trace.
104
+
> Please note as well that code such as the following, which was valid before, will still compile now but may report a
105
+
> misleading trace. The second catch handler will work but it cpptrace won't know about the handler's type and won't
106
+
> collect a trace that doesn't match the first handler's type, `std::logic_error`.
105
107
>
106
108
> ```cpp
107
109
> CPPTRACE_TRY {
108
110
> foo();
109
111
> } CPPTRACE_CATCH(const std::logic_error& e) {
110
112
> ...
111
113
> } catch(const std::exception& e) {
112
-
> handle_exception(e);
114
+
> ...
113
115
> }
114
116
> ```
115
117
116
118
Potentially-breaking changes:
117
119
- This version of cpptrace reworks the public interface to use an inline ABI versioning namespace. All symbols in the
118
-
public interface are now secretly in the `cpptrace::v1` namespace. This is an ABI break, but any abi mismatch will
120
+
public interface are now secretly in the `cpptrace::v1` namespace. This is an ABI break, but any ABI mismatch will
119
121
result in linker errors instead of silent bugs. This change is an effort to allow future evolution of cpptrace in a
120
122
way that respects ABI.
121
123
- This version fixes a problem with returns from `CPPTRACE_TRY` blocks on windows. Unfortunately, this macro has to use
122
124
an IILE on windows and as such `return` statements won't properly return from the enclosing function. This was a
123
125
footgun and now `return` statements in `CPPTRACE_TRY` blocks are prevented from compiling on windows.
124
126
125
127
Added
126
-
- Added `cpptrace::try_catch` for handling multiple alternatives with stack traces access
128
+
- Added `cpptrace::try_catch` for handling multiple alternatives with access to current exception traces
127
129
- Added `cpptrace::rethrow` utility for rethrowing exceptions from `CPPTRACE_CATCH` while preserving the stacktrace https://github.com/jeremy-rifkin/cpptrace/issues/214
128
130
- Added utilities for getting the current trace from the last rethrow point
- Added support for C++20 modules https://github.com/jeremy-rifkin/cpptrace/pull/248
140
142
- Added `cpptrace::load_symbols_for_file` to support DLLs loaded at runtime when using dbghelp https://github.com/jeremy-rifkin/cpptrace/pull/247
141
143
144
+
Removed
145
+
- Removed `CPPTRACE_TRYZ` and `CPPTRACE_CATCHZ` macros
146
+
- Removed the `CPPTRACE_CATCH_ALT` macro
147
+
142
148
Fixed
143
149
- Fixed a problem where `CPPTRACE_TRY` blocks could contain `return` statements but not return on windows due to an IILE. This is now an error. https://github.com/jeremy-rifkin/cpptrace/issues/245
144
150
- Fixed cases where cpptrace could print to stderr on internal errors without the user desiring so https://github.com/jeremy-rifkin/cpptrace/issues/234
145
151
- Fixed a couple internal locking mistakes
146
-
- Prevented a couple code paths that could be susceptible to static init order issues
152
+
- Fixed a couple of code paths that could be susceptible to static init order issues
147
153
- Fixed bug with loading elf symbol tables that contain zero-sized entries
148
154
- Fixed an incorrect assertion regarding looking up symbols at program counters that reside before any seen subprogram DIE https://github.com/jeremy-rifkin/cpptrace/issues/250
149
155
- Fixed issue with `cpptrace::stacktrace::to_string()` ending with a newline on empty traces
0 commit comments