Skip to content

Instantly share code, notes, and snippets.

@fbettag
Created February 1, 2012 09:03
Show Gist options
  • Save fbettag/1716051 to your computer and use it in GitHub Desktop.
Save fbettag/1716051 to your computer and use it in GitHub Desktop.
Lift Error Repo
object MailHelpers {
import net.liftweb.util.Mailer
import net.liftweb.util.Mailer._
def report(subject: String, msg: String) {
Mailer.sendMail(
From("report@yoursite", Full("From Name")),
Subject(subject),
To("service-ml@your-domain"),
PlainPlusBodyType(msg, "UTF-8"))
}
}
try {
somethingexplodes()
} catch {
case e => MailHelpers.report("Error in Foo", e.getMessage())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment