Skip to content

Commit

Permalink
Improve !show
Browse files Browse the repository at this point in the history
  • Loading branch information
ushitora-anqou committed Sep 7, 2023
1 parent 1098db8 commit ac5b17e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/verifier.ml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ let verify_notes pool notes =
| Loader.Show sql -> (
match Datastore.(query (prepare con sql) []) with
| Error msg -> failwithf "Error !show: %s\n" msg
| Ok [] | Ok [ [ Null ] ] -> ()
| Ok [ [ Text s ] ] -> Printf.printf "%s\n" s
| _ -> failwith "Error !show: invalid result")
| _ -> failwithf "Error !show: invalid result:\n%s" sql)
| Assert sql -> (
match Datastore.(query (prepare con sql) []) with
| Error msg -> failwithf "Error !assert: %s\n" msg
Expand Down

0 comments on commit ac5b17e

Please sign in to comment.