Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] An error only kills the immediate function, but not its caller #181

Open
marcgurevitx opened this issue Aug 10, 2024 · 0 comments
Open

Comments

@marcgurevitx
Copy link
Contributor

If an error occurs inside a function (1) the error is reported, (2) the function interrupts, (3) the caller of the function continues to run.

f = function
	print "f 1"
	ERROR
	print "f 2"
end function

g = function
	print "g 1"
	f
	print "g 2"
end function

g

Running the program prints:

g 1
f 1
Runtime Error: Undefined Identifier: 'ERROR' is unknown in this context [line 4]
g 2

Not observed in Mini Micro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant