From 7660ddc41759bc4892e267151d573971c108146a Mon Sep 17 00:00:00 2001 From: hustf Date: Wed, 11 Oct 2023 10:15:23 +0200 Subject: [PATCH] Just a minor syntax thing which might cause small problems. MethodError don't accept messages. modified: src/text.jl modified: test/text-wrapping.jl --- src/text.jl | 2 +- test/text-wrapping.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text.jl b/src/text.jl index 9dc5d378..72ba26b5 100644 --- a/src/text.jl +++ b/src/text.jl @@ -150,7 +150,7 @@ function get_fontsize() font_size = sign(m.yy)*sqrt(m.yx^2+m.yy^2) return font_size else - throw(MethodError(get_fontsize, "Please use Cairo v1.0.5 or later to use this feature.")) + throw(ErrorException("Please use Cairo v1.0.5 or later to use this feature.")) end end diff --git a/test/text-wrapping.jl b/test/text-wrapping.jl index d4c7ae0c..164fdc31 100644 --- a/test/text-wrapping.jl +++ b/test/text-wrapping.jl @@ -24,7 +24,7 @@ function text_wrap_tests(fname) @test received_fsize == fsize catch # should throw with Cairo < 1.0.5 - @test_throws MethodError get_fontsize() + @test_throws ErrorException get_fontsize() end @layer begin translate(pos)