Skip to content

Commit

Permalink
change log message a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Nov 23, 2020
1 parent efd91e5 commit 6f4c88e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Usage

```nim
requires "https://github.com/Quamolit/json-paint.nim#v0.0.16"
requires "https://github.com/Quamolit/json-paint.nim#v0.0.17"
```

```nim
Expand Down
6 changes: 5 additions & 1 deletion src/json_paint/shape_renderer.nim
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ proc processJsonTree*(ctx: ptr Context, tree: JsonNode, base: TreeContext) =
if verboseMode:
echo tree.pretty

if tree.kind == JNull:
echo "WARNING: null passed to tree processor"
return

case tree.kind
of JArray:
for item in tree.elems:
Expand All @@ -272,7 +276,7 @@ proc processJsonTree*(ctx: ptr Context, tree: JsonNode, base: TreeContext) =
echo tree.pretty
showError("Unknown type")
else:
showError("Expects a `type` field on JSON data")
showError("Expects a `type` field on JSON data: " & $tree)
else:
echo "Invalid JSON node:"
echo pretty(tree)
Expand Down

0 comments on commit 6f4c88e

Please sign in to comment.