From 4edae3f518353bb21a02fcda2dfcff83c5a72fc3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 26 Jan 2012 12:08:39 +0100 Subject: New onCommit scripting system. --- server/src/session.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'server/src/session.cc') diff --git a/server/src/session.cc b/server/src/session.cc index fcd138a..234f004 100644 --- a/server/src/session.cc +++ b/server/src/session.cc @@ -121,12 +121,21 @@ void Session::setIdle(bool idle) } } -void Session::commit() +void Session::commit() throw(LUAScript::Exception, Journal::Exception) { DEBUG(session, "[%p] commit(sessionid: '%s')\n", this, sessionid.c_str()); if(_journal != NULL) { - _journal->commit(); + try { + _journal->runOnCommitScripts(); + } catch(LUAScript::Exception &e) { + throw e; + } + try { + _journal->commit(); + } catch(Journal::Exception &e) { + throw e; + } delete _journal; _journal = NULL; } -- cgit v1.2.3