mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Report db failures in mod_muc_mnesia:restore_room
This commit is contained in:
parent
6214e0385d
commit
1a9b147baf
2 changed files with 4 additions and 2 deletions
|
@ -76,9 +76,11 @@ store_room(_LServer, Host, Name, Opts, _) ->
|
|||
mnesia:transaction(F).
|
||||
|
||||
restore_room(_LServer, Host, Name) ->
|
||||
case catch mnesia:dirty_read(muc_room, {Name, Host}) of
|
||||
try mnesia:dirty_read(muc_room, {Name, Host}) of
|
||||
[#muc_room{opts = Opts}] -> Opts;
|
||||
_ -> error
|
||||
catch
|
||||
_:_ -> {error, db_failure}
|
||||
end.
|
||||
|
||||
forget_room(_LServer, Host, Name) ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue