aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.cc20
1 files 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 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: main.cc,v 1.7 2002/08/13 23:56:02 fluxgen Exp $ 25// $Id: main.cc,v 1.8 2002/10/13 21:48:28 fluxgen Exp $
26 26
27 27
28 28
@@ -32,7 +32,7 @@
32#include "../version.h" 32#include "../version.h"
33 33
34#ifdef HAVE_CONFIG_H 34#ifdef HAVE_CONFIG_H
35#include "../config.h" 35#include "config.h"
36#endif // HAVE_CONFIG_H 36#endif // HAVE_CONFIG_H
37 37
38//use GNU extensions 38//use GNU extensions
@@ -52,11 +52,9 @@
52#include <sys/param.h> 52#include <sys/param.h>
53#endif // HAVE_SYS_PARAM_H 53#endif // HAVE_SYS_PARAM_H
54 54
55#ifndef MAXPATHLEN
56#define MAXPATHLEN 255
57#endif // MAXPATHLEN
58
59#include <iostream> 55#include <iostream>
56#include <stdexcept>
57
60using namespace std; 58using namespace std;
61 59
62#ifdef DEBUG_UDS 60#ifdef DEBUG_UDS
@@ -119,7 +117,7 @@ int main(int argc, char **argv) {
119 } 117 }
120 118
121 session_display = argv[i]; 119 session_display = argv[i];
122 char dtmp[MAXPATHLEN]; 120 char dtmp[255];
123 sprintf(dtmp, "DISPLAY=%s", session_display); 121 sprintf(dtmp, "DISPLAY=%s", session_display);
124 122
125 if (putenv(dtmp)) { 123 if (putenv(dtmp)) {
@@ -204,8 +202,12 @@ int main(int argc, char **argv) {
204 fluxbox = new Fluxbox(argc, argv, session_display, rc_file); 202 fluxbox = new Fluxbox(argc, argv, session_display, rc_file);
205 fluxbox->eventLoop(); 203 fluxbox->eventLoop();
206 204
207 } catch (int _exitcode) { 205 } catch (std::out_of_range oor) {
208 exitcode=_exitcode; 206 cerr<<"Fluxbox: Out of range: "<<oor.what()<<endl;
207 } catch (std::logic_error le) {
208 cerr<<"Fluxbox: Logic error: "<<le.what()<<endl;
209 } catch (std::runtime_error re) {
210 cerr<<"Fluxbox: Runtime error: "<<re.what()<<endl;
209 } catch (...) { 211 } catch (...) {
210 cerr<<"Fluxbox: Unknown error."<<endl; 212 cerr<<"Fluxbox: Unknown error."<<endl;
211 } 213 }