From 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Thu, 27 Sep 2018 15:40:30 +0200 Subject: Starting to separate background and popup code. --- src/Struct/Error.elm | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/Struct/Error.elm (limited to 'src/Struct/Error.elm') diff --git a/src/Struct/Error.elm b/src/Struct/Error.elm deleted file mode 100644 index 5f40c09..0000000 --- a/src/Struct/Error.elm +++ /dev/null @@ -1,45 +0,0 @@ -module Struct.Error exposing (Type, Mode(..), new, to_string) - --------------------------------------------------------------------------------- --- TYPES ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -type Mode = - IllegalAction - | Programming - | Unimplemented - | Networking - | Failure - -type alias Type = - { - mode: Mode, - message: String - } - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -new : Mode -> String -> Type -new mode str = - { - mode = mode, - message = str - } - -to_string : Type -> String -to_string e = - ( - (case e.mode of - Failure -> "The action failed: " - IllegalAction -> "Request discarded: " - Programming -> "Error in the program (please report): " - Unimplemented -> "Update discarded due to unimplemented feature: " - Networking -> "Error while conversing with the server: " - ) - ++ e.message - ) - -- cgit v1.2.3-70-g09d2