mirror of
https://github.com/boostorg/python.git
synced 2026-01-31 08:22:18 +00:00
65 lines
4.3 KiB
HTML
65 lines
4.3 KiB
HTML
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>exception_translator</title>
|
|
<link rel="stylesheet" href="../../boostbook.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
|
|
<link rel="home" href="../index.html" title="Boost.Python Reference Manual">
|
|
<link rel="up" href="../high_level_components.html" title="Chapter 2. High Level Components">
|
|
<link rel="prev" href="errors_hpp/example.html" title="Example">
|
|
<link rel="next" href="exception_translator/function_register_exception_tran.html" title="Function register_exception_translator">
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table cellpadding="2" width="100%"><tr>
|
|
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../images/boost.png"></td>
|
|
<td align="center"><a href="../../../index.html">Home</a></td>
|
|
<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
|
|
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
|
|
<td align="center"><a href="../../../more/index.htm">More</a></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="errors_hpp/example.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../high_level_components.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="exception_translator/function_register_exception_tran.html"><img src="../../images/next.png" alt="Next"></a>
|
|
</div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
|
|
<a name="high_level_components.exception_translator"></a><a class="link" href="exception_translator.html" title="exception_translator">exception_translator</a>
|
|
</h2></div></div></div>
|
|
<div class="toc"><dl class="toc">
|
|
<dt><span class="section"><a href="exception_translator.html#high_level_components.exception_translator.introduction">Introduction</a></span></dt>
|
|
<dt><span class="section"><a href="exception_translator/function_register_exception_tran.html">Function
|
|
<code class="computeroutput"><span class="identifier">register_exception_translator</span></code></a></span></dt>
|
|
<dt><span class="section"><a href="exception_translator/example.html">Example</a></span></dt>
|
|
</dl></div>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h3 class="title">
|
|
<a name="high_level_components.exception_translator.introduction"></a><a class="link" href="exception_translator.html#high_level_components.exception_translator.introduction" title="Introduction">Introduction</a>
|
|
</h3></div></div></div>
|
|
<p>
|
|
As described here, it is important to make sure that exceptions thrown
|
|
by C++ code do not pass into the Python interpreter core. By default, Boost.Python
|
|
translates all C++ exceptions thrown by wrapped functions and module init
|
|
functions into Python, but the default translators are extremely limited:
|
|
most C++ exceptions will appear in Python as a RuntimeError exception whose
|
|
representation is 'Unidentifiable C++ Exception'. To produce better error
|
|
messages, users can register additional exception translators as described
|
|
below.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2002-2005, 2015 David Abrahams, Stefan Seefeld<p>
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>
|
|
</p>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="errors_hpp/example.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../high_level_components.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="exception_translator/function_register_exception_tran.html"><img src="../../images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|