I want to catch zero division error but do not know which exact pattern should I write for that
Result = try 5/0 catch {'EXIT',{badarith,_}} -> 0.
It works when I catch all the exceptions via
Result = try 5/0 catch _:_ -> 0.
but the first example gives
** exception error: an error occurred when evaluating an arithmetic expression
So how to properly catch zero division