Errors
foo + 1 # (ArithmeticError) bad argument in arithmetic expression :erlang.+(:foo, 1)
raise "oops" # (RuntimeError) oops
raise ArgumentError, message: "invalid argument foo" # (ArgumentError) invalid argument fooErrors
err = try do
5/0
rescue
ArithmeticError -> "Can't Divide by Zero"
end
IO.puts errCustom Errors
Throws
Exits
Last updated