Fix session database error handling

Catch Database_Exception.