Skip to content

Commit 3ee0c81

Browse files
oskgostrub
authored andcommitted
improve error messages
1 parent b5eb295 commit 3ee0c81

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/phl/ecPhlRnd.ml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ let wp_equiv_rnd_r bij tc =
589589
let t_equiv_rnd_r side pos bij_info tc =
590590
match side, pos, bij_info with
591591
| Some side, None, (None, None) ->
592-
wp_equiv_disj_rnd_r side tc
592+
wp_equiv_disj_rnd_r side tc
593+
| Some side, None, _ ->
594+
tc_error !!tc "one-sided rnd takes no arguments"
593595
| None, _, _ -> begin
594596
let pos =
595597
match pos with
@@ -617,7 +619,7 @@ let t_equiv_rnd_r side pos bij_info tc =
617619
end
618620

619621
| _ ->
620-
tc_error !!tc "invalid argument"
622+
tc_error !!tc "two-sided rnd requires a bijection"
621623

622624
(* -------------------------------------------------------------------- *)
623625
let wp_equiv_disj_rnd = FApi.t_low1 "wp-equiv-disj-rnd" wp_equiv_disj_rnd_r

0 commit comments

Comments
 (0)