mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-09-13 09:26:23 -07:00
Improve error handling during post formatting
This commit is contained in:
parent
82bf2942c6
commit
ec63cf0ac9
7 changed files with 44 additions and 32 deletions
|
@ -642,8 +642,12 @@ func reparseHTMLCallback(_ http.ResponseWriter, _ *http.Request, _ *gcsql.Staff,
|
|||
errEv.Err(err).Caller().Msg("Unable to scan SQL row")
|
||||
return "", err
|
||||
}
|
||||
formatted := posting.FormatMessage(messageRaw, boardDir)
|
||||
gcsql.ExecSQL(updateQuery, formatted, postID)
|
||||
if formatted, err := posting.FormatMessage(messageRaw, boardDir); err != nil {
|
||||
errEv.Err(err).Caller().Msg("Unable to format message")
|
||||
return "", err
|
||||
} else {
|
||||
gcsql.ExecSQL(updateQuery, formatted, postID)
|
||||
}
|
||||
}
|
||||
outputStr += "Done reparsing HTML<hr />"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue