pub fn from_type<A>(ty: &PyType, args: A) -> PyErr
    where
        A: PyErrArguments + Send + Sync + 'static,
    {
        if unsafe { ffi::PyExceptionClass_Check(ty.as_ptr()) } == 0 {
            return exceptions_must_derive_from_base_exception(ty.py());
        }

        PyErr::from_state(PyErrState::LazyValue {
            ptype: ty.into(),
            pvalue: boxed_args(args),
        })
    }
/// Constructs a new PyErr from the given Python type and arguments.
///
/// `ty` is the exception type; usually one of the standard exceptions
/// like `exceptions::PyRuntimeError`.
///
/// `args` is either a tuple or a single value, with the same meaning as in [`PyErr::new`].
///
/// If an error occurs during normalization (for example if `T` is not a Python type which
/// extends from `BaseException`), then a different error may be produced during normalization.
///
/// This error will be stored in an unnormalized state.
Constructs a new PyErr from the given Python type and arguments.
`ty` is the exception type; usually one of the standard exceptions
like `exceptions::PyRuntimeError`.

`args` is either a tuple or a single value, with the same meaning as in [`PyErr::new`].

If an error occurs during normalization (for example if `T` is not a Python type which
extends from `BaseException`), then a different error may be produced during normalization.

This error will be stored in an unnormalized state.
Constructs a new PyErr from the given Python type and arguments . ` ty ` is the exception type ; usually one of the standard exceptions like ` exceptions :: PyRuntimeError ` . ` args ` is either a tuple or a single value with the same meaning as in [ ` PyErr :: new ` ] . If an error occurs during normalization ( for example if ` T ` is not a Python type which extends from ` BaseException ` ) then a different error may be produced during normalization . This error will be stored in an unnormalized state .
pub fn from_type<A>(ty: &PyType, args: A) -> PyErr
    where
        A: PyErrArguments + Send + Sync + 'static,
    {
        if unsafe { ffi::PyExceptionClass_Check(ty.as_ptr()) } == 0 {
            return exceptions_must_derive_from_base_exception(ty.py());
        }
        PyErr::from_state(PyErrState::LazyValue {
            ptype: ty.into(),
            pvalue: boxed_args(args),
        })
    }
pub fn from_type < A > ( ty : & PyType , args : A ) -> PyErr where A : PyErrArguments + Send + Sync + ' static , { if unsafe { ffi :: PyExceptionClass_Check ( ty . as_ptr ( ) ) } == 0 { return exceptions_must_derive_from_base_exception ( ty . py ( ) ) ; } PyErr :: from_state ( PyErrState :: LazyValue { ptype : ty . into ( ) , pvalue : boxed_args ( args ) , } ) }
Constructs a new PyErr from the given Python type and arguments.
Constructs a new PyErr from the given Python type and arguments .
ty
&PyType
args
A
ty
&PyType
args
A