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

Bugfix/ls24004538/call error indicator program stack #642

Merged

Conversation

dom-apuliasoft
Copy link
Collaborator

@dom-apuliasoft dom-apuliasoft commented Oct 18, 2024

Description

Fix a very specific corner case on CALL statements with error indicators that caused the compiler to think we never exited the erroring program.

Technical notes

It appears that when we threw a runtime error in interpreter.execute(this.cu, params, false, callerParams) in program.kt we caught the thrown error in CallStmt, skipping the program exit logic. For this reason the interpreter was stuck thinking we never exited that program.

Fixed by adding an intermediate catch logic that performs a cleanup before throwing again.

Related to:

  • LS24004538

Checklist:

  • If this feature involves RPGLE fixes or improvements, they are well-described in the summary.
  • There are tests for this feature.
  • RPGLE code used for tests is easily understandable and includes comments that clarify the purpose of this feature.
  • The code follows Kotlin conventions (run ./gradlew ktlintCheck).
  • The code passes all tests (run ./gradlew check).
  • Relevant documentation is included in the docs directory.

@lanarimarco lanarimarco merged commit 8ed992a into develop Oct 22, 2024
1 check passed
@lanarimarco lanarimarco deleted the bugfix/LS24004538/call-error-indicator-program-stack branch October 22, 2024 08:29
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

Successfully merging this pull request may close these issues.

2 participants