diff --git a/widget/src/motif/nsToolkit.cpp b/widget/src/motif/nsToolkit.cpp index 912e5b7fd62..aadac5297ec 100644 --- a/widget/src/motif/nsToolkit.cpp +++ b/widget/src/motif/nsToolkit.cpp @@ -28,6 +28,23 @@ void RunPump(void* arg) { } +//------------------------------------------------------------------------- +// +// constructor +// +//------------------------------------------------------------------------- +int nsToolkitErrorHandler (Display * mydisplay, XErrorEvent * myerr) +{ + char msg[80] ; + + XGetErrorText (mydisplay, myerr->error_code, msg, 80) ; + fprintf (stderr, "-------------------------------------\n"); + fprintf (stderr, "Error code %s\n", msg) ; + fprintf (stderr, "-------------------------------------\n"); + //exit() ; +} + + //------------------------------------------------------------------------- // // constructor @@ -35,6 +52,7 @@ void RunPump(void* arg) //------------------------------------------------------------------------- nsToolkit::nsToolkit() { + XSetErrorHandler (nsToolkitErrorHandler) ; NS_INIT_REFCNT(); }