Skip to content

Commit 4da55f0

Browse files
fixing catch_backtrace
1 parent 8de83ee commit 4da55f0

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.0.2] - 2021-07-17
10+
### Fixed
11+
- using `Base.catch_backtrace()` now also in `@TryCatch`
12+
913
## [2.0.1] - 2021-07-16
1014
### Changed
1115
- using `Base.catch_backtrace()` now instead of `Base.catch_stack()` which got deprecated

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DataTypesBasic"
22
uuid = "83eed652-29e8-11e9-12da-a7c29d64ffc9"
33
authors = ["Sahm Stephan <stephan.sahm@gmx.de>"]
4-
version = "2.0.1"
4+
version = "2.0.2"
55

66
[deps]
77
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/Try.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ try
109109
r = your_code
110110
Identity(r)
111111
catch exc
112-
Const(Thrown(exc, Base.catch_stack()))
112+
Const(Thrown(exc, Base.catch_backtrace()))
113113
end
114114
```
115115
"""
@@ -139,7 +139,7 @@ try
139139
Identity(r)
140140
catch exc
141141
if exc isa YourException
142-
Const(Thrown(exc, Base.catch_stack()))
142+
Const(Thrown(exc, Base.catch_backtrace()))
143143
else
144144
rethrow()
145145
end
@@ -153,7 +153,7 @@ macro TryCatch(exception, expr)
153153
Identity(r)
154154
catch exc
155155
if exc isa $(esc(exception))
156-
Const(Thrown(exc, Base.catch_stack()))
156+
Const(Thrown(exc, Base.catch_backtrace()))
157157
else
158158
rethrow()
159159
end

0 commit comments

Comments
 (0)