Improve error handling

master
Unknwon 2017-02-17 18:23:35 -05:00
parent 7bd6052efe
commit b481927d5e
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
2 changed files with 2 additions and 2 deletions

View File

@ -373,7 +373,7 @@ func (u *User) UploadAvatar(data []byte) error {
// DeleteAvatar deletes the user's custom avatar.
func (u *User) DeleteAvatar() error {
log.Trace("DeleteAvatar[%d]: %s", u.ID, u.CustomAvatarPath())
log.Trace("DeleteAvatar [%d]: %s", u.ID, u.CustomAvatarPath())
os.Remove(u.CustomAvatarPath())
u.UseCustomAvatar = false

View File

@ -94,7 +94,7 @@ func (ctx *Context) Handle(status int, title string, err error) {
ctx.Data["Title"] = "Page Not Found"
case 500:
ctx.Data["Title"] = "Internal Server Error"
log.Error(4, "%s: %v", title, err)
log.Error(2, "%s: %v", title, err)
if !setting.ProdMode || (ctx.IsSigned && ctx.User.IsAdmin) {
ctx.Data["ErrorMsg"] = err
}