# Built-in Exceptions

# sqrt(-1)

# Throwing Exceptions

a = 1; b = 0
# b != 0 ? a / b : throw(DivideError())

# Errors

# b != 0 ? a / b : error("Divide by zero not allowed!")

# Try-Catch-Finally

try
  sqrt(-1)
catch e
  println("Square root of negative number not allowed!")
end

try
  sqrt(-1)
catch e
  println("Square root of negative number not allowed!")
finally
  println("This is always executed!")
end