4
0
Fork 0

Throw when number of inputs is not valid

pull/16/head
hswick 7 years ago
parent b56165af74
commit b2929483d8
  1. 2
      lib/exw3.ex

@ -493,7 +493,7 @@ defmodule ExW3 do
types_signature = Enum.join(["(", Enum.join(input_types, ","), ")"]) types_signature = Enum.join(["(", Enum.join(input_types, ","), ")"])
if Enum.count(input_types) != Enum.count(arguments) do if Enum.count(input_types) != Enum.count(arguments) do
IO.warn("Number of provided arguments is invalid") throw "Number of provided arguments is invalid"
end end
bin <> (ExW3.encode_data(types_signature, arguments) |> Base.encode16(case: :lower)) bin <> (ExW3.encode_data(types_signature, arguments) |> Base.encode16(case: :lower))

Loading…
Cancel
Save