From 5cc64f4eb3f1a5cf5ec706cbc05c9eef8bf3ccf3 Mon Sep 17 00:00:00 2001 From: fluxgen <fluxgen> Date: Fri, 18 Jan 2002 01:27:46 +0000 Subject: catching exception on window creation --- src/Screen.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Screen.cc b/src/Screen.cc index 88fa659..27373d3 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -365,7 +365,16 @@ rootcommand("") continue; if (attrib.map_state != IsUnmapped) { - new FluxboxWindow(children[i], this); + FluxboxWindow *tempwin = 0; + try { + tempwin = new FluxboxWindow(children[i], this); + } catch (FluxboxWindow::Error err) { + FluxboxWindow::showError(err); + delete tempwin; + tempwin = 0; + } catch (...) { + cerr<<"FATAL: Unknown catch"<<endl; + } FluxboxWindow *win = fluxbox->searchWindow(children[i]); if (win) { -- cgit v0.11.2