From 8f3d2ae089b619532e735bacae9a6f108be2bc24 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 22 Feb 2013 18:45:59 +0100 Subject: [PATCH] main: catch all exceptions --- src/main.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cc b/src/main.cc index 9c26c7ba..5ee41468 100644 --- a/src/main.cc +++ b/src/main.cc @@ -892,8 +892,12 @@ int main(int argc, char* argv[]) } catch (Kakoune::exception& error) { - puts("uncaught exception:\n"); - puts(error.description().c_str()); + on_assert_failed(("uncaught exception:\n" + error.description()).c_str()); + return -1; + } + catch (...) + { + on_assert_failed("uncaught exception"); return -1; } return 0;