try without catch

Ulf Wiger (AL/EAB) ulf.wiger@REDACTED
Wed Nov 16 08:52:20 CET 2005


 
Nick Linker wrote:
>
> Maybe I didn't understant the idea, but if you intend to add "catch"
> later, why don't write
> 
> case Expr of
>     Result -> Action
> end.

Yes, of course, but part of the reason was to see whether
it worked as described in the manual. ;-)

The 'of', 'catch' and 'after' parts of the try statement
are all optional, so

try Expr of 
   Result -> Action
end

should have been allowed (and it was - by the compiler).

/Uffe



More information about the erlang-questions mailing list