Skip to content

Commit 9427dd0

Browse files
authored
Merge pull request #17 from lemenkov/otp-26-error-messages
Fix to pass Eunit tests with Erlang/OTP 26
2 parents ba81675 + 43ad5a2 commit 9427dd0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/p1_file_queue.erl

+3-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,9 @@ format_error({not_owner, Path}) ->
200200
"not a file queue owner (" ++ binary_to_list(Path) ++ ")";
201201
format_error({Posix, Path}) ->
202202
case file:format_error(Posix) of
203-
"unknown POSIX error" ->
203+
"unknown POSIX error" -> % Erlang/OTP 25 and older
204+
atom_to_list(Posix) ++ " (" ++ binary_to_list(Path) ++ ")";
205+
[$u, $n, $k, $n, $o, $w, $n | _] -> % Erlang/OTP 26 and newer
204206
atom_to_list(Posix) ++ " (" ++ binary_to_list(Path) ++ ")";
205207
Reason ->
206208
Reason ++ " (" ++ binary_to_list(Path) ++ ")"

0 commit comments

Comments
 (0)