OR construction in erlang ?

Olivier olivier.sambourg@REDACTED
Tue Apr 12 20:48:25 CEST 2005

Hi everyone

Is there an equivalent to the PHP "or" construction ? I'd like to be 
able to throw errors when a match fails, i.e. :

ok = test_function(Args) or throw(error_in_test_function).

I know I can achieve the same with a catch and case syntax but nesting 
several tests gets ugly (or increases the number of functions in a 

Thanks :)


More information about the erlang-questions mailing list