// Panic is called is an panic is caught by the framework func (this *BaseController) Panic() revel.Result { defer func() { mongo.CloseSession(this.UserId, this.MongoSession) this.MongoSession = nil }() tracelog.TRACE(this.UserId, "Panic", this.Request.URL.Path) return nil }
// After is called once the controller method completes func (this *BaseController) After() revel.Result { defer func() { if this.MongoSession != nil { mongo.CloseSession(this.UserId, this.MongoSession) this.MongoSession = nil } }() tracelog.TRACE(this.UserId, "After", this.Request.URL.Path) return nil }