diff options
author | Badlop <badlop@process-one.net> | 2018-08-13 13:56:29 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2018-08-13 13:56:29 +0200 |
commit | 10e01b7bfc6736e591ee11d61f711fe88e5658e3 (patch) | |
tree | a2fce0119912ca639bb21bb9be8e00c990e1f617 /src/ejd2sql.erl | |
parent | In response with list of room subscriptions include also events (#2272) (diff) |
Return human error messages when calling export2sql with wrong path (#2480)
Diffstat (limited to 'src/ejd2sql.erl')
-rw-r--r-- | src/ejd2sql.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ejd2sql.erl b/src/ejd2sql.erl index 3f802e412..40793f405 100644 --- a/src/ejd2sql.erl +++ b/src/ejd2sql.erl @@ -216,6 +216,10 @@ prepare_output(FileName, normal) when is_list(FileName) -> case file:open(FileName, [write, raw]) of {ok, Fd} -> Fd; + {error, eacces} -> + exit({"Not enough permission to the file or path", FileName}); + {error, enoent} -> + exit({"Path does not exist", FileName}); Err -> exit(Err) end; |