Improve Java director exception customization documentation

This commit is contained in:
William S Fulton 2017-11-29 19:06:34 +00:00
commit 34712c0108
4 changed files with 406 additions and 138 deletions

View file

@ -67,7 +67,7 @@
<li><a href="#Typemaps_nn35">"memberin" typemap</a>
<li><a href="#Typemaps_nn36">"varin" typemap</a>
<li><a href="#Typemaps_nn37">"varout" typemap</a>
<li><a href="#throws_typemap">"throws" typemap</a>
<li><a href="#Typemaps_throws_typemap">"throws" typemap</a>
</ul>
<li><a href="#Typemaps_nn39">Some typemap examples</a>
<ul>
@ -2884,11 +2884,11 @@ The "varout" typemap is used to convert a C/C++ object to an object in the targe
language when reading a C/C++ global variable. This is implementation specific.
</p>
<H3><a name="throws_typemap">11.5.14 "throws" typemap</a></H3>
<H3><a name="Typemaps_throws_typemap">11.5.14 "throws" typemap</a></H3>
<p>
The "throws" typemap is only used when SWIG parses a C++ method with an exception specification or has the <tt>%catches</tt> feature attached to the method.
The "throws" typemap is only used when SWIG parses a C++ method with an exception specification or has the <tt>%catches</tt> feature attached to the method (see <a href="SWIGPlus.html#SWIGPlus_catches">Exception handling with %catches</a>).
It provides a default mechanism for handling C++ methods that have declared the exceptions they will throw.
The purpose of this typemap is to convert a C++ exception into an error or exception in the target language.
It is slightly different to the other typemaps as it is based around the exception type rather than the type of a parameter or variable.
@ -2913,7 +2913,7 @@ For example:
<p>
As can be seen from the resulting generated code below, SWIG generates an exception handler
with the catch block comprising the "throws" typemap content.
when wrapping the <tt>bar</tt> function with the catch block comprising the "throws" typemap content.
</p>
<div class="code">