From 28f6cbaf5a412cce275a058540556f23e154393e Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Thu, 5 Apr 2018 00:03:27 +0000 Subject: [PATCH] Fix accidental infinite loop in error message formatting --- src/Vervis/Application.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Vervis/Application.hs b/src/Vervis/Application.hs index 1c82752..96c1e5f 100644 --- a/src/Vervis/Application.hs +++ b/src/Vervis/Application.hs @@ -50,6 +50,8 @@ import System.Log.FastLogger (defaultBufSize, newStdoutLoggerSet, import Yesod.Default.Main (LogFunc) import Yesod.Mail.Send (runMailer) +import qualified Data.Text as T (unpack) + -- Import all relevant handler modules here. -- Don't forget to add new modules to your cabal file! import Vervis.Handler.Common @@ -120,9 +122,9 @@ makeFoundation appSettings = do r <- migrateDB case r of Left err -> do - let msg = "DB migration failed: " <> msg + let msg = "DB migration failed: " <> err $logError msg - error msg + error $ T.unpack msg Right (_from, _to) -> $logInfo "DB migration success" -- Return the foundation