blog-service icon indicating copy to clipboard operation
blog-service copied to clipboard

Cannot convert 'nil' to type 'any'

Open githublister opened this issue 2 years ago • 1 comments

defer func() { if err := recover(); err != nil { global.Logger.WithCallersFrames().Errorf(c, "panic recover err: %v", err)

			err := defailtMailer.SendMail(
				global.EmailSetting.To,
				fmt.Sprintf("异常抛出,发生时间: %d", time.Now().Unix()),
				fmt.Sprintf("错误信息: %v", err),
			)
			if err != nil {
				global.Logger.Panicf(c, "mail.SendMail err: %v", err)
			}

			app.NewResponse(c).ToErrorResponse(errcode.ServerError)
			c.Abort()
		}
	}()

githublister avatar Oct 24 '23 23:10 githublister