summaryrefslogtreecommitdiff
path: root/src/ncmpcpp.cpp
diff options
context:
space:
mode:
authorAndrzej Rybczak <electricityispower@gmail.com>2014-08-31 08:46:57 +0200
committerAndrzej Rybczak <electricityispower@gmail.com>2014-08-31 08:47:27 +0200
commit5d6d390f77e10728b0288147567c19f1e1af8de7 (patch)
treedd229cfdae4c1c663bf6927d02e7e28c44c9c3e5 /src/ncmpcpp.cpp
parent4ac46f8c9db33a59517ea9d61ef63fafd35cd8d7 (diff)
catch all exceptions and show them as unexpected errors
Diffstat (limited to 'src/ncmpcpp.cpp')
-rw-r--r--src/ncmpcpp.cpp4
1 files changed, 4 insertions, 0 deletions
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();