summaryrefslogtreecommitdiff
path: root/src/mod_last.erl
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2018-03-20 22:18:43 +0100
committerBadlop <badlop@process-one.net>2018-03-20 22:18:43 +0100
commitb4b3ff50d6a1a1c07ec7c8b8a65657abf29f0c57 (patch)
treeeeb5beff8bfe019f792b1889d81303068cb9dd59 /src/mod_last.erl
parentReport meaningful error when luerl is not available (diff)
If mod_last is disabled, return error instead of crashing (#2330)
Diffstat (limited to 'src/mod_last.erl')
-rw-r--r--src/mod_last.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_last.erl b/src/mod_last.erl
index 7e53fe5d..ae02b15a 100644
--- a/src/mod_last.erl
+++ b/src/mod_last.erl
@@ -188,7 +188,9 @@ get_last(LUser, LServer) ->
?LAST_CACHE, {LUser, LServer},
fun() -> Mod:get_last(LUser, LServer) end);
false ->
- Mod:get_last(LUser, LServer)
+ Mod:get_last(LUser, LServer);
+ undefined ->
+ error
end,
case Res of
{ok, {TimeStamp, Status}} -> {ok, TimeStamp, Status};