| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-09-27 15:40:30 +0200 |
| commit | 2f22e667fbea56884d74ed27777f2e9f3fc9fd53 (patch) | |
| tree | 75300c58cc7b287993887f84b2d68b9d515a9ec0 /src/Struct/Error.elm | |
| parent | 486ee1dbe21be962e89f421e1dd5f3cbb2fd2177 (diff) | |
Starting to separate background and popup code.
Diffstat (limited to 'src/Struct/Error.elm')
| -rw-r--r-- | src/Struct/Error.elm | 45 |
1 files changed, 0 insertions, 45 deletions
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 - ) - |


