Mercurial > repos > public > sbplib_julia
changeset 1982:486b3c6f919e feature/grids/geometry_functions
Throw better error type for transfinite interpolation check
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 26 Feb 2025 22:50:26 +0100 |
parents | ea04a542a526 |
children | 730c9848ad0b |
files | src/Grids/geometry.jl test/Grids/geometry_test.jl |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/geometry.jl Wed Feb 26 22:44:10 2025 +0100 +++ b/src/Grids/geometry.jl Wed Feb 26 22:50:26 2025 +0100 @@ -191,7 +191,7 @@ if check_transfiniteinterpolation(Bool, s) return nothing else - error("The end of each curve in the transfinite interpolation should be the same as the beginning of the next curve.") + throw(ArgumentError("The end of each curve in the transfinite interpolation should be the same as the beginning of the next curve.")) end end
--- a/test/Grids/geometry_test.jl Wed Feb 26 22:44:10 2025 +0100 +++ b/test/Grids/geometry_test.jl Wed Feb 26 22:50:26 2025 +0100 @@ -230,10 +230,10 @@ @test check_transfiniteinterpolation(Bool, s3) == false @test check_transfiniteinterpolation(Bool, s4) == false - @test_throws Exception check_transfiniteinterpolation(s1) - @test_throws Exception check_transfiniteinterpolation(s2) - @test_throws Exception check_transfiniteinterpolation(s3) - @test_throws Exception check_transfiniteinterpolation(s4) + @test_throws ArgumentError check_transfiniteinterpolation(s1) + @test_throws ArgumentError check_transfiniteinterpolation(s2) + @test_throws ArgumentError check_transfiniteinterpolation(s3) + @test_throws ArgumentError check_transfiniteinterpolation(s4) end @testset "Grids.jacobian" begin