aboutsummaryrefslogtreecommitdiff
path: root/src/RenderError.hs
diff options
context:
space:
mode:
authorJoris2015-11-21 21:41:38 +0100
committerJoris2015-11-21 21:41:38 +0100
commit5375ad26dd78220185f1ffe05222250c06dc1a0c (patch)
tree30998d4fe19206e8c5c9e564db116d2022e5e313 /src/RenderError.hs
parent7acd7a42f7663aa79d18e24bdb9fe19bf15f8fae (diff)
downloadevents-5375ad26dd78220185f1ffe05222250c06dc1a0c.tar.gz
events-5375ad26dd78220185f1ffe05222250c06dc1a0c.tar.bz2
events-5375ad26dd78220185f1ffe05222250c06dc1a0c.zip
Get next week birthdays and send an empty mail for the moment
Diffstat (limited to 'src/RenderError.hs')
-rw-r--r--src/RenderError.hs34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/RenderError.hs b/src/RenderError.hs
new file mode 100644
index 0000000..9b9732f
--- /dev/null
+++ b/src/RenderError.hs
@@ -0,0 +1,34 @@
+{-# LANGUAGE OverloadedStrings #-}
+
+module RenderError
+ ( birthdate
+ , config
+ ) where
+
+import System.IO (stderr)
+
+import Data.Text (Text)
+import qualified Data.Text as T
+import qualified Data.Text.IO as T
+
+import qualified Model.Path as Path
+
+birthdate :: Text -> IO ()
+birthdate err =
+ T.hPutStr stderr $
+ T.concat
+ [ "Error while parsing file "
+ , T.pack Path.birthdate
+ , ":\n"
+ , err
+ ]
+
+config :: Text -> IO ()
+config err =
+ T.hPutStr stderr $
+ T.concat
+ [ "Error while parsing config file "
+ , T.pack Path.config
+ , ":\n"
+ , err
+ ]