Skip to content

Commit 1ae71aa

Browse files
authored
Update util.jl
1 parent c4f16d3 commit 1ae71aa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/util.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@ extract_test_result_value(test_result::Test.Pass) = test_result.value
22

33
recursively_unwrap_ex(ex::ErrorException) = ex
44
recursively_unwrap_ex(ex::Base.IOError) = ex
5-
function recursively_unwrap_ex(outer_ex::TaskFailedException)
6-
new_thing = outer_ex.task.exception
7-
return recursively_unwrap_ex(new_thing)
8-
end
95

6+
@static if Base.VERSION >= v"1.2-"
7+
function recursively_unwrap_ex(outer_ex::TaskFailedException)
8+
new_thing = outer_ex.task.exception
9+
return recursively_unwrap_ex(new_thing)
10+
end
11+
end
12+
1013
Base.@kwdef struct ConfigForTestingTaskFailedException
1114
expected_outer_ex_T
1215
expected_inner_ex_INSTANCE

0 commit comments

Comments
 (0)