This commit is contained in:
11
docs/snippets/python/api/error_handling.md
Normal file
11
docs/snippets/python/api/error_handling.md
Normal file
@@ -0,0 +1,11 @@
|
||||
```python title="Python"
|
||||
from kreuzberg import extract_file_sync, ExtractionConfig, KreuzbergError
|
||||
|
||||
config = ExtractionConfig()
|
||||
|
||||
try:
|
||||
result = extract_file_sync("missing.pdf", config=config)
|
||||
except KreuzbergError as e:
|
||||
print(f"Extraction failed: {e}")
|
||||
raise
|
||||
```
|
||||
Reference in New Issue
Block a user