Skip to content

Commit

Permalink
procket: return badarg
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed Jan 22, 2014
1 parent 8756499 commit 89ce265
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/procket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ optarg({interface, Name}) when is_list(Name) ->
true ->
switch("I", Name);
false ->
erlang:error({bad_interface, Name})
erlang:error({badarg, Name})
end;

optarg({dev, Dev}) when is_list(Dev) ->
case is_device(Dev) of
true ->
switch("d", Dev);
false ->
erlang:error({bad_device, Dev})
erlang:error({badarg, Dev})
end;

% Ignore any other arguments
Expand Down

0 comments on commit 89ce265

Please sign in to comment.