From 12488d4f56aa964345af5fe0db441c3840d80e37 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 2 Dec 2002 20:02:56 +0000 Subject: throws string instead of number --- src/BaseDisplay.cc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/BaseDisplay.cc b/src/BaseDisplay.cc index 41b2c3e..f10180f 100644 --- a/src/BaseDisplay.cc +++ b/src/BaseDisplay.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: BaseDisplay.cc,v 1.24 2002/12/01 13:41:54 rathnor Exp $ +// $Id: BaseDisplay.cc,v 1.25 2002/12/02 20:02:56 fluxgen Exp $ @@ -146,21 +146,20 @@ static int handleXErrors(Display *d, XErrorEvent *e) { I18n *i18n = I18n::instance(); if (display() == 0) { - fprintf(stderr, + throw string( i18n-> getMessage( FBNLS::BaseDisplaySet, FBNLS::BaseDisplayXConnectFail, - "BaseDisplay::BaseDisplay: connection to X server failed.\n")); - - throw static_cast(2); //throw error 2 + "BaseDisplay::BaseDisplay: connection to X server failed.")); + } else if (fcntl(ConnectionNumber(display()), F_SETFD, 1) == -1) { - fprintf(stderr, + throw string( i18n-> getMessage( FBNLS::BaseDisplaySet, FBNLS::BaseDisplayCloseOnExecFail, "BaseDisplay::BaseDisplay: couldn't mark display connection " - "as close-on-exec\n")); - throw static_cast(2); //throw error 2 + "as close-on-exec")); + } -- cgit v0.11.2