diff options
author | Joris | 2015-11-22 20:36:59 +0100 |
---|---|---|
committer | Joris | 2015-11-22 20:36:59 +0100 |
commit | a9bc46efe3624344573f96fafa8af194016183a2 (patch) | |
tree | a863a2c9029620b06ea617a4caaba1c621150949 /src/Main.hs | |
parent | 3abc150dc92171129f3b8209e57f6d5bdadf5c9b (diff) | |
download | events-a9bc46efe3624344573f96fafa8af194016183a2.tar.gz events-a9bc46efe3624344573f96fafa8af194016183a2.tar.bz2 events-a9bc46efe3624344573f96fafa8af194016183a2.zip |
Exit failure when there are parsing errors
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index a9d5731..3a34269 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -6,7 +6,7 @@ module Main import qualified Data.Text.IO as T -import qualified RenderError +import Exit (exitWithParsingError) import Notification (notifyTodayAndNextWeek) import Model.Config @@ -18,6 +18,6 @@ main = do eitherBirthdates <- parseBirthdates <$> T.readFile Path.birthdate eitherConfig <- getConfig Path.config case (eitherBirthdates, eitherConfig) of - (Left err, _) -> RenderError.birthdate err - (_, Left err) -> RenderError.config err + (Left err, _) -> exitWithParsingError Path.birthdate err + (_, Left err) -> exitWithParsingError Path.config err (Right birthdates, Right config) -> notifyTodayAndNextWeek birthdates config |