forked from avTranscoder/avTranscoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathavException.i
More file actions
62 lines (57 loc) · 1015 Bytes
/
Copy pathavException.i
File metadata and controls
62 lines (57 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%include <std_except.i>
%include <exception.i>
/*
All swig exception types:
SWIG_MemoryError
SWIG_IndexError
SWIG_RuntimeError
SWIG_IOError
SWIG_TypeError
SWIG_OverflowError
SWIG_ValueError
SWIG_DivisionByZero
SWIG_SyntaxError
SWIG_SystemError
*/
%exception {
try
{
$action
}
catch( std::out_of_range& e )
{
SWIG_exception( SWIG_IndexError, e.what() );
}
catch( std::bad_alloc& e )
{
SWIG_exception( SWIG_MemoryError, e.what() );
}
catch( std::ios_base::failure& e )
{
SWIG_exception( SWIG_IOError, e.what() );
}/*
catch( std::bad_cast& e )
{
SWIG_exception( SWIG_TypeError, e.what() );
}*/
catch( std::overflow_error& e )
{
SWIG_exception( SWIG_OverflowError, e.what() );
}
catch( std::underflow_error& e )
{
SWIG_exception( SWIG_OverflowError, e.what() );
}
catch( std::invalid_argument& e )
{
SWIG_exception( SWIG_ValueError, e.what() );
}
catch( std::exception& e )
{
SWIG_exception( SWIG_RuntimeError, e.what() );
}
catch(...)
{
SWIG_exception( SWIG_RuntimeError, "Unknown C++ exception" );
}
}