synta-python 0.3.0

Python extension module for the synta ASN.1 library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Error handling for Python bindings
//!
//! The `SyntaError` custom Python exception is defined here and exported to
//! Python as `synta.SyntaError`.  The `SyntaErr` Rust newtype that bridges
//! `synta::Error` to `PyErr` lives in `synta-python-common` and is re-exported
//! here for backward-compatibility with all callers in this crate.

use pyo3::create_exception;

// Create the custom exception type visible from Python.
create_exception!(synta, SyntaError, pyo3::exceptions::PyException);

// Re-export shared error bridging from the common crate.
pub(crate) use synta_python_common::SyntaErr;