diff options
author | Badlop <badlop@process-one.net> | 2018-03-20 22:18:43 +0100 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2018-03-20 22:18:43 +0100 |
commit | b4b3ff50d6a1a1c07ec7c8b8a65657abf29f0c57 (patch) | |
tree | eeb5beff8bfe019f792b1889d81303068cb9dd59 /src/mod_last.erl | |
parent | Report 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.erl | 4 |
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}; |