mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-28 07:34:53 +09:00
Fix accidental infinite loop in error message formatting
This commit is contained in:
parent
bc83ccfd42
commit
28f6cbaf5a
1 changed files with 4 additions and 2 deletions
|
@ -50,6 +50,8 @@ import System.Log.FastLogger (defaultBufSize, newStdoutLoggerSet,
|
||||||
import Yesod.Default.Main (LogFunc)
|
import Yesod.Default.Main (LogFunc)
|
||||||
import Yesod.Mail.Send (runMailer)
|
import Yesod.Mail.Send (runMailer)
|
||||||
|
|
||||||
|
import qualified Data.Text as T (unpack)
|
||||||
|
|
||||||
-- Import all relevant handler modules here.
|
-- Import all relevant handler modules here.
|
||||||
-- Don't forget to add new modules to your cabal file!
|
-- Don't forget to add new modules to your cabal file!
|
||||||
import Vervis.Handler.Common
|
import Vervis.Handler.Common
|
||||||
|
@ -120,9 +122,9 @@ makeFoundation appSettings = do
|
||||||
r <- migrateDB
|
r <- migrateDB
|
||||||
case r of
|
case r of
|
||||||
Left err -> do
|
Left err -> do
|
||||||
let msg = "DB migration failed: " <> msg
|
let msg = "DB migration failed: " <> err
|
||||||
$logError msg
|
$logError msg
|
||||||
error msg
|
error $ T.unpack msg
|
||||||
Right (_from, _to) -> $logInfo "DB migration success"
|
Right (_from, _to) -> $logInfo "DB migration success"
|
||||||
|
|
||||||
-- Return the foundation
|
-- Return the foundation
|
||||||
|
|
Loading…
Reference in a new issue