From bd84f442099180060f234b04795ae6c78646752a Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 13 Oct 2002 21:48:28 +0000 Subject: extra catch --- src/main.cc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main.cc b/src/main.cc index 9317792..e63700d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: main.cc,v 1.7 2002/08/13 23:56:02 fluxgen Exp $ +// $Id: main.cc,v 1.8 2002/10/13 21:48:28 fluxgen Exp $ @@ -32,7 +32,7 @@ #include "../version.h" #ifdef HAVE_CONFIG_H -#include "../config.h" +#include "config.h" #endif // HAVE_CONFIG_H //use GNU extensions @@ -52,11 +52,9 @@ #include #endif // HAVE_SYS_PARAM_H -#ifndef MAXPATHLEN -#define MAXPATHLEN 255 -#endif // MAXPATHLEN - #include +#include + using namespace std; #ifdef DEBUG_UDS @@ -119,7 +117,7 @@ int main(int argc, char **argv) { } session_display = argv[i]; - char dtmp[MAXPATHLEN]; + char dtmp[255]; sprintf(dtmp, "DISPLAY=%s", session_display); if (putenv(dtmp)) { @@ -204,8 +202,12 @@ int main(int argc, char **argv) { fluxbox = new Fluxbox(argc, argv, session_display, rc_file); fluxbox->eventLoop(); - } catch (int _exitcode) { - exitcode=_exitcode; + } catch (std::out_of_range oor) { + cerr<<"Fluxbox: Out of range: "<