相关疑难解决方法(0)

邮件异常日志记录在实时Grails webapp中

我希望我的Grails网络应用程序能够为每个到达最终用户的异常发送电子邮件.

基本上我正在寻找一种优雅的方式来实现相当于:

  try {
      // ... all logic/db-access/etc required to render the page is executed here ...
  }
  catch (Exception e) {
      sendmail("exception@example.com", "An exception was thrown while processing a http-request", e.toString);
  }
Run Code Online (Sandbox Code Playgroud)

grails exception gsp

4
推荐指数
1
解决办法
1228
查看次数

标签 统计

exception ×1

grails ×1

gsp ×1