Skip to content

fix: Exception Handling and multiline comment #2092

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

Merged
merged 1 commit into from
Mar 11, 2025

Conversation

qnixsynapse
Copy link
Contributor

Describe Your Changes

  • This pull request addresses two key improvements in the codebase:

    • Exception Handling Improvement:
      Updated the exception handling in the Text struct's ToJson method. The catch clause now correctly captures the exception by reference (const std::exception & e) instead of by value. This change prevents unnecessary copying of the exception object and adheres to best practices for exception handling in C++.
    • Logging Code multiline comment fix:
      Commented out the unused GGUF_LOG macro in gguf_file.cpp using a block comment to resolve compiler complaints about multiline comments.

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@qnixsynapse qnixsynapse merged commit e541d12 into dev Mar 11, 2025
8 checks passed
@qnixsynapse qnixsynapse deleted the fix/exception_handling_by_ref branch March 11, 2025 02:12
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