source: trunk/gcc/libjava/gnu/gcj/xlib/natXException.cc

Last change on this file was 2, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 651 bytes
Line 
1/* Copyright (C) 2000 Free Software Foundation
2
3 This file is part of libgcj.
4
5This software is copyrighted work licensed under the terms of the
6Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
7details. */
8
9#include <X11/Xlib.h>
10
11#include <gcj/cni.h>
12#include <gnu/gcj/xlib/Display.h>
13#include <gnu/gcj/xlib/XException.h>
14
15jstring gnu::gcj::xlib::XException::toString(Display* display, jint status)
16{
17 ::Display* dpy = (::Display*) (display->display);
18
19 const int ERROR_TEXT_LENGTH = 256;
20 char errorText[ERROR_TEXT_LENGTH];
21
22 XGetErrorText(dpy, status, errorText, ERROR_TEXT_LENGTH);
23 return JvNewStringLatin1(errorText);
24}
Note: See TracBrowser for help on using the repository browser.