5
Last change
on this file since 4a05652 was
4a05652,
checked in by Sebastian Huber <sebastian.huber@…>, on 11/25/19 at 14:33:24
|
libtests/dl*: Rename source files
Rename source files to use a %.c -> %.o and %.cc -> %.o pattern. Use
*.cc for C++ source files instead of *.cpp to be in line with other C++
source files.
Update #3818.
|
-
Property mode set to
100644
|
File size:
760 bytes
|
Line | |
---|
1 | #include "dl-load.h" /* make the symbol a C linkage */ |
---|
2 | |
---|
3 | #include <stdexcept> |
---|
4 | |
---|
5 | #include <rtems/test.h> |
---|
6 | |
---|
7 | #define printf(...) rtems_printf(&rtems_test_printer, __VA_ARGS__); |
---|
8 | |
---|
9 | void exception_dl(bool throw_runtime) |
---|
10 | { |
---|
11 | printf("exception_dl: begin\n"); |
---|
12 | try |
---|
13 | { |
---|
14 | printf("exception_dl: throwing...\n"); |
---|
15 | if (throw_runtime) |
---|
16 | throw std::runtime_error("throw std::runtime_error object"); |
---|
17 | else |
---|
18 | throw dl_test_throw_me("throw dl_test_throw_me object"); |
---|
19 | } |
---|
20 | catch (dl_test_throw_me const& e) |
---|
21 | { |
---|
22 | printf("%s: caught: %s\n", __func__, e.what()); |
---|
23 | } |
---|
24 | catch (std::exception const& e) |
---|
25 | { |
---|
26 | printf("%s: caught: %s\n", __func__, e.what()); |
---|
27 | } |
---|
28 | catch (...) |
---|
29 | { |
---|
30 | printf("%s: caught: unknown\n", __func__); |
---|
31 | } |
---|
32 | printf("exception_dl: end\n"); |
---|
33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.