print error and include in txt log on crash; fix email migration

This commit is contained in:
Harvey Tindall
2021-08-25 18:10:06 +01:00
parent 5b319d6612
commit 1bfec54c93
2 changed files with 23 additions and 3 deletions

View File

@@ -50,6 +50,10 @@ func Exit(err interface{}) {
log.Fatalf("Failed to load template: %v", err)
}
logCache := lineCache.String()
if err != nil {
fmt.Println(err)
logCache += "\n" + fmt.Sprint(err)
}
logCache += "\n" + string(debug.Stack())
sanitized := sanitizeLog(logCache)
data := map[string]interface{}{