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

281 bug unable to import ezexceptions with ezsnmp v200b0 #285

Merged

Conversation

carlkidcrypto
Copy link
Owner

@carlkidcrypto carlkidcrypto commented Jan 30, 2025

This adds custom exception handling.

New files were created see ExceptionsBase.cpp and Exceptions.py

This lays out the ground work and by no means is complete.

- created the exceptions.i interface file
- updated other interface files to use the exceptions.i file
- added the c+ code for the custom exception classes for EzSnmp. More can be added as needed.
- fixed and improvements to the new interface file. Not working yet, but getting closer.
- this version compiles. yay.
- the exceptions interface file is now generated properly.
- starting to replace run_time errors with errors defined in `exceptions.h`.
- updated the docs with the new exception types
- updated rest of runtime_errors
- attempted to use new exceptions in tests, that didn't work. I'll need to follow what I did for session.py and sessionbase.py
- added GenericException to the interface
- few doc fixes in development doc.
- added an exceptionbase layer
- the python3 wrapper adds the Exception python class and then sets up the rest of the custom errors.
- added Base to the name of c++ errors
- still working on the python wrapper. getting closer.
- this get's us closer. I now see ` _exceptions.GenericErrorBase: sysDescripto.0: Unknown Object Identifier (Sub-id not found: (top) -> sysDescripto)`
- current solution is to create a wrapper around netsnmp to catch exceptions from lower level calls and map them to simple names that don't have base in the name.
- making the new netsnmpbase
- making the new netsnmp wrapper python3 code around netsnmpbase
- ran black
- ran clang
- organize alphabetically
- working on docs, need to rerun doxygen and sphinx
- test netsnmp tests, great start for POC.
- saving doc work
Results (101.34s (0:01:41)):
      35 passed
      60 failed
- forgot to commit the new handle_error common function.
- forgot to add returns to the function calls.
- the test_session tests now pass on their own.
- pass now 100 percent
- 100 percent pass now.
@carlkidcrypto carlkidcrypto added the bug Something isn't working label Jan 30, 2025
@carlkidcrypto carlkidcrypto self-assigned this Jan 30, 2025
@carlkidcrypto carlkidcrypto linked an issue Jan 30, 2025 that may be closed by this pull request
- updating the Docs to work again. Getting close.
- updated the index.rst with an example that works.
- updated docs again.
@carlkidcrypto carlkidcrypto enabled auto-merge (squash) January 30, 2025 05:18
Copy link

Title Coverage Tests Skipped Failures Errors Time
macos-latest - 3.9 191 0 💤 0 ❌ 0 🔥 1m 29s ⏱️
macos-latest - 3.10 191 0 💤 0 ❌ 0 🔥 1m 26s ⏱️
macos-latest - 3.11 191 0 💤 0 ❌ 0 🔥 1m 20s ⏱️
macos-latest - 3.12 191 0 💤 0 ❌ 0 🔥 1m 25s ⏱️
macos-latest - 3.13 191 0 💤 0 ❌ 0 🔥 1m 25s ⏱️
ubuntu-latest - 3.9 191 0 💤 0 ❌ 0 🔥 2m 10s ⏱️
ubuntu-latest - 3.10 191 0 💤 0 ❌ 0 🔥 2m 7s ⏱️
ubuntu-latest - 3.11 191 0 💤 0 ❌ 0 🔥 2m 4s ⏱️
ubuntu-latest - 3.12 191 0 💤 0 ❌ 0 🔥 2m 4s ⏱️
ubuntu-latest - 3.13 191 0 💤 0 ❌ 0 🔥 2m 5s ⏱️

@carlkidcrypto carlkidcrypto merged commit 711a2e0 into main Jan 30, 2025
14 of 31 checks passed
@carlkidcrypto carlkidcrypto deleted the 281-bug-unable-to-import-ezexceptions-with-ezsnmp-v200b branch January 30, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] Unable to import EzExceptions with ezsnmp v2.0.0b0
1 participant