Skip to content

Commit

Permalink
Stop printing spec errors
Browse files Browse the repository at this point in the history
Instead rely on exception handlers to print the errors. This fixes
#1.
  • Loading branch information
gridbugs committed Nov 28, 2024
1 parent 6c8d340 commit 6d3c2ad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Stop printing spec errors (fixes #1)

## 0.2.0

### Added
Expand Down
1 change: 0 additions & 1 deletion src/climate/error.ml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,5 @@ module Spec_error = struct
end

let spec_error error =
Printf.eprintf "%s" (Spec_error.to_string error);
raise (Spec_error.E error)
;;
2 changes: 1 addition & 1 deletion tests/unit_tests/spec_error_tests.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let check f =
let _ = Command.singleton (f ()) in
()
with
| Spec_error.E _ -> ()
| Spec_error.E e -> Printf.eprintf "%s" (Spec_error.to_string e)
;;

let%expect_test "duplicate argument name" =
Expand Down

0 comments on commit 6d3c2ad

Please sign in to comment.