summaryrefslogtreecommitdiffstats
path: root/tests/ingen_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ingen_test.cpp')
-rw-r--r--tests/ingen_test.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/ingen_test.cpp b/tests/ingen_test.cpp
index df7e9d34..d6ebee26 100644
--- a/tests/ingen_test.cpp
+++ b/tests/ingen_test.cpp
@@ -80,8 +80,8 @@ run(int argc, char** argv)
try {
world = std::make_unique<World>(nullptr, nullptr, nullptr);
world->load_configuration(argc, argv);
- } catch (std::exception& e) {
- std::cout << "ingen: " << e.what() << std::endl;
+ } catch (const std::exception& e) {
+ std::cerr << "ingen: " << e.what() << std::endl;
return EXIT_FAILURE;
}
@@ -245,8 +245,13 @@ run(int argc, char** argv)
int
main(int argc, char** argv)
{
- ingen::set_bundle_path_from_code(
- reinterpret_cast<void (*)()>(&ingen::test::ingen_try));
+ try {
+ ingen::set_bundle_path_from_code(
+ reinterpret_cast<void (*)()>(&ingen::test::ingen_try));
- return ingen::test::run(argc, argv);
+ return ingen::test::run(argc, argv);
+ } catch (const std::exception& e) {
+ std::cerr << "ingen: " << e.what() << std::endl;
+ return EXIT_FAILURE;
+ }
}