Dialyzer and erlang:error/1

Oscar Hellström <>
Wed Jul 8 12:45:03 CEST 2009


Hi All,

I'm trying to express that a valid list of options will return ok while
any invalid option would eventually throw an exception, but Dialyzer and
I don't get along.

Dialyzer says:
foo.erl:14: The call foo:verify(Options::any(),[any(),...]) will never
return since it differs in argument position 2 from the success typing
arguments: (['bar' | 'foo'],[])

This is entirely true, but it's not an error, it's what I want! I guess
I'm failing to express what I want here, so could anybody help me?

Best regards

-- 
Oscar Hellström, 
Office: +44 20 7655 0337
Mobile: +44 798 45 44 773
Erlang Training and Consulting Ltd
http://www.erlang-consulting.com/

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: foo.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090708/e58f0bc0/attachment.ksh>


More information about the erlang-questions mailing list