Skip to content

CodeSample: add Python error handling by extracting last traceback fr…#13

Merged
evshvarov merged 1 commit intointersystems-community:masterfrom
AshokThangavel:py-cls-exce-code-sample
Dec 27, 2025
Merged

CodeSample: add Python error handling by extracting last traceback fr…#13
evshvarov merged 1 commit intointersystems-community:masterfrom
AshokThangavel:py-cls-exce-code-sample

Conversation

@AshokThangavel
Copy link
Copy Markdown
Contributor

This pull request adds a code sample demonstrating how to handle Python exceptions
in InterSystems IRIS and extract the last traceback frame.

The sample shows:

  • Capturing Python exceptions in embedded Python classes
  • Extracting the filename, line number, function name, and code traceback using traceback.extract_tb in IRIS class
  • Mapping Python exception details into IRIS ObjectScript

This helps Python ↔ IRIS exception handling.

Thank you!

@evshvarov
Copy link
Copy Markdown
Member

@AshokThangavel - thank you very much!

@evshvarov evshvarov merged commit d9fcf20 into intersystems-community:master Dec 27, 2025
@evshvarov
Copy link
Copy Markdown
Member

Do you have any examples of repositories using it?
Need more evidence and support from the community before introducing it as a dependency of a very basic embedded Python template.

@AshokThangavel
Copy link
Copy Markdown
Contributor Author

Sorry, I have added my comments in wrong pull request.

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