sqlite ->
sqlite_sql_query(Query)
end
- catch
- Class:Reason ->
+ catch exit:{timeout, _} ->
+ {error, <<"timed out">>};
+ exit:{killed, _} ->
+ {error, <<"killed">>};
+ exit:{normal, _} ->
+ {error, <<"terminated unexpectedly">>};
+ Class:Reason ->
ST = erlang:get_stacktrace(),
?ERROR_MSG("Internal error while processing SQL query: ~p",
[{Class, Reason, ST}]),
{error, <<"Previous session PID is dead">>};
exit:{normal, _} ->
{error, <<"Previous session PID has exited">>};
+ exit:{killed, _} ->
+ {error, <<"Previous session PID has been killed">>};
exit:{timeout, _} ->
ejabberd_sm:close_session(OldSID, U, S, R),
ejabberd_c2s:stop(OldPID),