exop v0.4.1 Release Notes

  • 🔄 Changes

    • func/1 check: You can provide your error message if custom validation function returns {:error, "Your validation message"}. In other cases false is treaded as validation fail with default message "isn't valid", everything else - validation success.
    • run/1 output: If your process/1 function returns a tuple {:error, _error_reason_} Exop will not wrap this output into former {:ok, _output_} tuple.

    So, if process/1 returns {:error, :ugly_error} you'll get exactly that tuple, not {:ok, {:error, :ugly_error}}.

    (run!/1 acts in the same manner with respect of it's bang nature (will return unwrapped value, an exception or your error tuple))