From 9ebb2e49f9088b45fd94d016dcb93d2524fe676f Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Fri, 6 Aug 2021 14:56:46 -0500 Subject: [PATCH] Fix validation error on JSONSchema 0.3 --- src/instance/validate.jl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/instance/validate.jl b/src/instance/validate.jl index 10dee55..42a7785 100644 --- a/src/instance/validate.jl +++ b/src/instance/validate.jl @@ -12,14 +12,10 @@ function validate(json, schema) result = JSONSchema.validate(json, schema) if result !== nothing if result isa JSONSchema.SingleIssue - path = join(result.path, " → ") - if length(path) == 0 - path = "root" - end - msg = "$(result.msg) in $(path)" + msg = "$(result.reason) in $(result.path)" else msg = convert(String, result) end - throw(msg) + throw("Error parsing input file: $(msg)") end end