Skip to content

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

Description

@marcgurevitx

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions