blob: 5ed2cd3afc0196d76cbcf9573684f5caee9aad10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.
#ifndef INCLUDED_GRAS_EXCEPTION_I
#define INCLUDED_GRAS_EXCEPTION_I
////////////////////////////////////////////////////////////////////////
// http://www.swig.org/Doc2.0/Library.html#Library_stl_exceptions
////////////////////////////////////////////////////////////////////////
%include <exception.i>
%exception
{
try{$action}
catch (const std::exception& e)
{SWIG_exception(SWIG_RuntimeError, e.what());}
}
#endif /*INCLUDED_GRAS_EXCEPTION_I*/
|