================
@@ -152,6 +152,41 @@ def b(x: str | bytes) -> bytes:
 ### Exception Classes ###
 
 
+class CXError(Exception):
----------------
DeinAlptraum wrote:

We already have a similar case with the bindings' `CXSaveError` for 
`clang_saveTranslationUnit` on the C side, for which we've implemented the 
`TranslationUnitSaveError` exception on Python side.
On the C side, we also have `CXErrorCode` for `clang_parseTranslationUnit`, 
`clang_reparseTranslationUnit` and `clang_createTranslationUnit`. Mirroring the 
`clang_saveTranslationUnit` call, there's already the 
`TranslationUnitLoadError` error for those 3 functions

I would thus suggest adding this to the `TranslationUnitLoadError`, rather than 
making a new exception for this

https://github.com/llvm/llvm-project/pull/102410
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to