[erlang-questions] wanted: example of try/catch

Bengt Kleberg <>
Fri Dec 8 15:58:10 CET 2006


greetings,

i am trying to use try/catch. the documentatin i have is the EUC 2004 
paper ''Erlang's exception handling revisited''. it has lead me to 
belive that this super simple example should produce 'kalle' in the 
erlang shell:

try false = true catch Error -> kalle end.

it does not. i get:
** exited: {{badmatch,true},[{erl_eval,expr,3}]} **


is there an alternative reading to ''Erlang's exception handling 
revisited''?
or is there a simple explanation as to why my example does not work?


bengt
-- 
    EPO guidelines 1978: "If the contribution to the known art resides
    solely in a computer program then the subject matter is not
    patentable in whatever manner it may be presented in the claims."



More information about the erlang-questions mailing list