Fixed exception example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12586 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
cd7fc2047b
commit
da1fc2ff6a
1 changed files with 2 additions and 2 deletions
|
|
@ -2356,7 +2356,7 @@ please refer to the python documentation:</p>
|
|||
<li>Static member variables are no longer accessed through the 'cvar' field (e.g., <tt>Dances.cvar.FishSlap</tt>).
|
||||
They are instead accessed in the idiomatic way (<tt>Dances.FishSlap</tt>).</li>
|
||||
</ul>
|
||||
<li><p>Wrapped types may not be thrown as python exceptions. Here's why: the python internals expect that all sub-classes of Exception will have this struct layout:</p>
|
||||
<li><p>Wrapped types may not be raised as python exceptions. Here's why: the python internals expect that all sub-classes of Exception will have this struct layout:</p>
|
||||
|
||||
<div class="code">
|
||||
<pre>
|
||||
|
|
@ -2405,7 +2405,7 @@ private:
|
|||
|
||||
<div class="targetlang">
|
||||
<pre>
|
||||
class MyPyException (Exception, MyException) :
|
||||
class MyPyException (Exception) :
|
||||
def __init__(self, msg, *args) :
|
||||
Exception.__init__(self, *args)
|
||||
self.myexc = MyException(msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue