From c8a96c3f27a6c381dc1719686f501e02de1b43b9 Mon Sep 17 00:00:00 2001 From: Spiros Eliopoulos Date: Wed, 3 Sep 2014 14:03:44 +0200 Subject: [PATCH] examples: Native.Error.throw -> raise --- examples/Todo.elm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Todo.elm b/examples/Todo.elm index 8bb0c8b..a85038c 100644 --- a/examples/Todo.elm +++ b/examples/Todo.elm @@ -31,7 +31,7 @@ import String -- There are some cases in the code below that should never happen and in fact -- cannot ever happen. In other languages, you'd use an `asset false` -- expression, or `undefined` to indicate that the case is impossible. In Elm, --- you can call `Native.Error.throw`. +-- you can call `Native.Error.raise`. -- import Native.Error @@ -104,7 +104,7 @@ startEdit m i = changeEdit : Model -> String -> Model changeEdit m d = case m.editing of - Nothing -> Native.Error.throw "trying to edit while not editing" + Nothing -> Native.Error.raise "trying to edit while not editing" Just (_, i) -> { m | editing <- Just (d, i) } -- Complete editing by setting the description of the current edit item to the @@ -113,7 +113,7 @@ changeEdit m d = commitEdit : Model -> Model commitEdit m = case m.editing of - Nothing -> Native.Error.throw "trying to finishing editing while not editing" + Nothing -> Native.Error.raise "trying to finishing editing while not editing" Just (t, i) -> let m' = setDescription m i t in { m' | editing <- Nothing }