In the examples below, A1. and A2. which use error break the program and show the error message. B1. and B2., which use ArgumentError do not. I’m using Julia 1.9.0. I’ve tried both of these inside functions, in case that makes a difference.
Is this a bug or am I missing something? I’ve switched to using error for now.
# A1.
begin
error("err")
end
# A2.
for i in 1:2
error("err")
end
# B1.
begin
ArgumentError("err")
end
# B2.
for i in 1:2
ArgumentError("err")
end