[m-rev.] for review: Clarify meaning of "abort" in library documentation.
jfischer at opturion.com
Sun Oct 8 20:56:38 AEDT 2017
On Sun, 8 Oct 2017, Peter Wang wrote:
> Replace most occurrences of "abort" with "throw an exception".
I think it would be even better if the messages said what kind
of exception is thrown.
It would also be good to extend to the library documentation section of
the coding standards to describe how exceptions thrown by library
predicates should be documented.
> diff --git a/library/assoc_list.m b/library/assoc_list.m
> index a3c04fa96..6a65c2569 100644
> --- a/library/assoc_list.m
> +++ b/library/assoc_list.m
> @@ -33,7 +33,8 @@
> :- func reverse_members(assoc_list(K, V)) = assoc_list(V, K).
> :- pred reverse_members(assoc_list(K, V)::in, assoc_list(V, K)::out) is det.
> - % Zip together two lists; abort if they are of different lengths.
> + % Zip together two lists.
> + % Throw an exception if they are of different lengths.
s/Throw/Throws/ here and below.
The diff is fine otherwise.
More information about the reviews