From 86f170f2135399ff71065d7a515e6387461ffb8c Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 23 Feb 2016 14:19:14 +0100 Subject: [PATCH] small rename --- src/core/CCResult.ml | 4 ++-- src/core/CCResult.mli | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/CCResult.ml b/src/core/CCResult.ml index ed05df1d..451a338a 100644 --- a/src/core/CCResult.ml +++ b/src/core/CCResult.ml @@ -58,11 +58,11 @@ let iter f e = match e with | Ok x -> f x | Error _ -> () -exception GetOnError +exception Get_error let get_exn = function | Ok x -> x - | Error _ -> raise GetOnError + | Error _ -> raise Get_error let catch e ~ok ~err = match e with | Ok x -> ok x diff --git a/src/core/CCResult.mli b/src/core/CCResult.mli index 565591b8..691dec3d 100644 --- a/src/core/CCResult.mli +++ b/src/core/CCResult.mli @@ -56,13 +56,13 @@ val map2 : ('a -> 'b) -> ('err1 -> 'err2) -> ('a, 'err1) t -> ('b, 'err2) t val iter : ('a -> unit) -> ('a, _) t -> unit (** Apply the function only in case of Ok *) -exception GetOnError +exception Get_error val get_exn : ('a, _) t -> 'a (** Extract the value [x] from [Ok x], fails otherwise. You should be careful with this function, and favor other combinators whenever possible. - @raise GetOnError if the value is an error. *) + @raise Get_error if the value is an error. *) val catch : ('a, 'err) t -> ok:('a -> 'b) -> err:('err -> 'b) -> 'b (** [catch e ~ok ~err] calls either [ok] or [err] depending on