comparison rust/hg-cpython/src/exceptions.rs @ 41184:dcf818267bc1

rust-cpython: rustdoc improvements By default, `cargo doc` builds the documentation for public constructs only, so we make public those that can. Since `cindex` is not safe, we keep it private. Unfortunately, the macro syntax of rust-cpython doesn't allow us to document the classes directly, so we resort to do that at the module level. Differential Revision: https://phab.mercurial-scm.org/D5546
author Georges Racinet <georges.racinet@octobus.net>
date Sat, 22 Dec 2018 11:38:03 +0100
parents 5532823e8c18
children ee943a920606
comparison
equal deleted inserted replaced
41183:c01fac6749e5 41184:dcf818267bc1
1 // ancestors.rs
2 //
3 // Copyright 2018 Georges Racinet <gracinet@anybox.fr>
4 //
5 // This software may be used and distributed according to the terms of the
6 // GNU General Public License version 2 or any later version.
7
8 //! Bindings for Rust errors
9 //!
10 //! [`GraphError`] exposes `hg::GraphError` as a subclass of `ValueError`
11 //!
12 //! [`GraphError`]: struct.GraphError.html
1 use cpython::exc::ValueError; 13 use cpython::exc::ValueError;
2 use cpython::{PyErr, Python}; 14 use cpython::{PyErr, Python};
3 use hg; 15 use hg;
4 16
5 py_exception!(rustext, GraphError, ValueError); 17 py_exception!(rustext, GraphError, ValueError);