From 5d6d390f77e10728b0288147567c19f1e1af8de7 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 31 Aug 2014 08:46:57 +0200 Subject: [PATCH] catch all exceptions and show them as unexpected errors --- src/ncmpcpp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 7faf3488..4b4edf3f 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -239,6 +239,10 @@ int main(int argc, char **argv) { Statusbar::printf("Error: %1%", e.errorMessage()); } + catch (std::exception &e) + { + Statusbar::printf("Unexpected error: %1%", e.what()); + } if (myScreen == myPlaylist) myPlaylist->EnableHighlighting();