From f8e5a1ab28e56935731507b6acf9d26cb6215225 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Tue, 16 Jul 2019 22:51:44 +0100 Subject: [PATCH 1/2] don't print nothing --- src/utils.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/utils.jl b/src/utils.jl index 14852c3..764ee13 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -303,6 +303,8 @@ function splitdef(fdef) di end +splitdef(::Nothing) = @assert(false, "Not a function definition: nothing") + """ combinedef(dict::Dict) From 4bc0f9307454039fe7ef421664d3d6a3a3c7d629 Mon Sep 17 00:00:00 2001 From: Lyndon White Date: Thu, 24 Oct 2019 17:46:26 +0100 Subject: [PATCH 2/2] just use repr --- src/utils.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/utils.jl b/src/utils.jl index 764ee13..5d7a690 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -284,7 +284,7 @@ all_params = [get(dict, :params, [])..., get(dict, :whereparams, [])...] ``` """ function splitdef(fdef) - error_msg = "Not a function definition: $fdef" + error_msg = "Not a function definition: $(repr(fdef))" @assert(@capture(longdef1(fdef), function (fcall_ | fcall_) body_ end), "Not a function definition: $fdef") @@ -303,9 +303,6 @@ function splitdef(fdef) di end -splitdef(::Nothing) = @assert(false, "Not a function definition: nothing") - - """ combinedef(dict::Dict)