Skip to content

Commit b8a6340

Browse files
committed
Raise consistently on avm_unix uart:open/1,2 failure
The configure-failure branch returned {error, _} while the other two failure paths raise; the open/1,2 spec only allows {pid(), fd()}. Signed-off-by: Paul Guyot <pguyot@kallisys.net>
1 parent f7594af commit b8a6340

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

libs/avm_unix/src/uart.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ open(Opts) ->
9191
{Pid, Fd};
9292
{error, _} = CfgErr ->
9393
atomvm:posix_close(Fd),
94-
CfgErr
94+
error(CfgErr)
9595
end;
9696
{error, Reason} ->
9797
error(Reason)

0 commit comments

Comments
 (0)