Skip to main content

_synta/
error.rs

1//! Error handling for Python bindings
2//!
3//! The `SyntaError` custom Python exception is defined here and exported to
4//! Python as `synta.SyntaError`.  The `SyntaErr` Rust newtype that bridges
5//! `synta::Error` to `PyErr` lives in `synta-python-common` and is re-exported
6//! here for backward-compatibility with all callers in this crate.
7
8use pyo3::create_exception;
9
10// Create the custom exception type visible from Python.
11create_exception!(synta, SyntaError, pyo3::exceptions::PyException);
12
13// Re-export shared error bridging from the common crate.
14pub(crate) use synta_python_common::SyntaErr;