.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium .\" .\" Permission is hereby granted, free of charge, to any person obtaining .\" a copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, .\" distribute, sublicense, and/or sell copies of the Software, and to .\" permit persons to whom the Software is furnished to do so, subject to .\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR .\" OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of the X Consortium shall .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by .\" Digital Equipment Corporation .\" .\" Portions Copyright \(co 1990, 1991 by .\" Tektronix, Inc. .\" .\" Permission to use, copy, modify and distribute this documentation for .\" any purpose and without fee is hereby granted, provided that the above .\" copyright notice appears in all copies and that both that copyright notice .\" and this permission notice appear in all copies, and that the names of .\" Digital and Tektronix not be used in in advertising or publicity pertaining .\" to this documentation without specific, written prior permission. .\" Digital and Tektronix makes no representations about the suitability .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" .\" Copyright (c) 1998, 2001 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Tue Oct 27 00:00:00 JST 1998 .\" by FUJIWARA Teruyoshi .\" Updated Fri Oct 5 01:18:52 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/X11/XSeErrHan.man,v 1.2 2001/01/27 18:20:04 dawes Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface .ds xL Xlib \- C Language X Interface .ds xC Inter-Client Communication Conventions Manual .na .de Ds .nf .\\$1D \\$2 \\$1 .ft 1 .\".ps \\n(PS .\".if \\n(VS>=40 .vs \\n(VSu .\".if \\n(VS<=39 .vs \\n(VSp .. .de De .ce 0 .if \\n(BD .DF .nr BD 0 .in \\n(OIu .if \\n(TM .ls 2 .sp \\n(DDu .fi .. .de FD .LP .KS .TA .5i 3i .ta .5i 3i .nf .. .de FN .fi .KE .LP .. .de IN \" send an index entry to the stderr .. .de C{ .KS .nf .D .\" .\" choose appropriate monospace font .\" the imagen conditional, 480, .\" may be changed to L if LB is too .\" heavy for your eyes... .\" .ie "\\*(.T"480" .ft L .el .ie "\\*(.T"300" .ft L .el .ie "\\*(.T"202" .ft PO .el .ie "\\*(.T"aps" .ft CW .el .ft R .ps \\n(PS .ie \\n(VS>40 .vs \\n(VSu .el .vs \\n(VSp .. .de C} .DE .R .. .de Pn .ie t \\$1\fB\^\\$2\^\fR\\$3 .el \\$1\fI\^\\$2\^\fP\\$3 .. .de ZN .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. .de hN .ie t <\fB\\$1\fR>\\$2 .el <\fI\\$1\fP>\\$2 .. .de NT .ne 7 .ds NO Note .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1 .ie n .sp .el .sp 10p .TB .ce \\*(NO .ie n .sp .el .sp 5p .if '\\$1'C' .ce 99 .if '\\$2'C' .ce 99 .in +5n .ll -5n .R .. . \" Note End -- doug kraft 3/85 .de NE .ce 0 .in -5n .ll +5n .ie n .sp .el .sp 10p .. .ny0 .TH XSetErrorHandler 3X11 "Release 6.5" "X Version 11" "XLIB FUNCTIONS" .SH 名前 .\"0 XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- default error handlers XSetErrorHandler, XGetErrorText, XDisplayName, XSetIOErrorHandler, XGetErrorDatabaseText \- デフォルトのエラーハンドラ .SH 書式 int (*XSetErrorHandler\^(\^\fIhandler\fP\^)\^)\^(\^) .br int (\^*\^\fIhandler\fP\^)\^(Display *, XErrorEvent *) .LP XGetErrorText\^(\^\fIdisplay\fP, \fIcode\fP, \fIbuffer_return\fP, \fIlength\fP\^) .br Display *\fIdisplay\fP\^; .br int \fIcode\fP\^; .br char *\fIbuffer_return\fP\^; .br int \fIlength\fP\^; .LP char *XDisplayName\^(\^\fIstring\fP\^) .br char *\fIstring\fP\^; .LP int (*XSetIOErrorHandler\^(\^\fIhandler\fP\^)\^)\^(\^) .br int (\^*\^\fIhandler\fP\^)(Display *); .LP XGetErrorDatabaseText\^(\^\fIdisplay\fP, \fIname\fP, \fImessage\fP, \fIdefault_string\fP, \fIbuffer_return\fP, \fIlength\fP\^) .br Display *\fIdisplay\fP\^; .br char *\fIname\fP, *\fImessage\fP\^; .br char *\fIdefault_string\fP\^; .br char *\fIbuffer_return\fP\^; .br int \fIlength\fP\^; .SH 引き数 .IP \fIbuffer_return\fP 1i .\"0 Returns the error description. エラー記述が返される。 .IP \fIcode\fP 1i .\"0 Specifies the error code for which you want to obtain a description. エラー記述を得ようとするエラーコードを指定する。 .IP \fIdefault_string\fP 1i .\"0 Specifies the default error message if none is found in the database. データベースで none になっている場合のデフォルトのエラーメッセージを 指定する。 .IP \fIdisplay\fP 1i .\"0 Specifies the connection to the X server. X サーバへの接続を指定する。 .IP \fIhandler\fP 1i .\"0 Specifies the program's supplied error handler. プログラムで与えるエラーハンドラを指定する。 .IP \fIlength\fP 1i .\"0 Specifies the size of the buffer. バッファのサイズを指定する。 .IP \fImessage\fP 1i .\"0 Specifies the type of the error message. エラーメッセージのタイプを指定する。 .IP \fIname\fP 1i .\"0 Specifies the name of the application. アプリケーションの名前を指定する。 .IP \fIstring\fP 1i .\"0 Specifies the character string. 文字列を指定する。 .SH 説明 .\"0 Xlib generally calls the program's .\"0 supplied error handler whenever an error is received. Xlib は普通、エラーを受け取ったときに必ずプログラムが 与えたエラーハンドラを呼び出す。 .\"0 It is not called on .\"0 .ZN BadName .\"0 errors from .\"0 .ZN OpenFont , .\"0 .ZN LookupColor , .\"0 or .\"0 .ZN AllocNamedColor .\"0 protocol requests or on .\"0 .ZN BadFont .\"0 errors from a .\"0 .ZN QueryFont .\"0 protocol request. ただし、 .ZN OpenFont , .ZN LookupColor , .ZN AllocNamedColor プロトコルリクエストからの .ZN BadName エラーや .\"0 .ZN QueryFont プロトコルリクエストからの .ZN BadFont エラーに対してはエラーハンドラは呼び出されない。 .\"0 These errors generally are reflected back to the program through the .\"0 procedural interface. 一般的にはこれらのエラーは、手続きインタフェースを通してプログラムに返 される。 .\"0 Because this condition is not assumed to be fatal, .\"0 it is acceptable for your error handler to return; .\"0 the returned value is ignored. この状態は致命的ではないと考えられるので、エラーハンドラから復帰するこ とは認められる。 この返り値は無視される。 .\"0 However, the error handler should not .\"0 call any functions (directly or indirectly) on the display .\"0 that will generate protocol requests or that will look for input events. しかし、エラーハンドラはディスプレイに対してプロトコルリクエストを生成 したり入力イベントを求めたりする関数を(直接的にも間接的にも)呼び出して はならない。 .\"0 The previous error handler is returned. このような場合、直前のエラーハンドラが返される。 .LP .\"0 The .\"0 .ZN XGetErrorText .\"0 function copies a null-terminated string describing the specified error code .\"0 into the specified buffer. 関数 .ZN XGetErrorText は、指定したエラーコードを説明する文字列(NULL で終端する)を指定した バッファにコピーする。 .\"0 The returned text is in the encoding of the current locale. 返される文字列は、現在のロケールのエンコーディングになっている。 .\"0 It is recommended that you use this function to obtain an error description .\"0 because extensions to Xlib may define their own error codes .\"0 and error strings. Xlib の拡張により独自のエラーコードやエラー文字列が定義されるかもしれ ないので、エラーの説明を得るためにはこの関数を使うことが推奨されている。 .LP .\"0 The .\"0 .ZN XDisplayName .\"0 function returns the name of the display that .\"0 .ZN XOpenDisplay .\"0 would attempt to use. 関数 .ZN XDisplayName は .ZN XOpenDisplay が使おうとするディスプレイの名前を返す。 .\"0 If a NULL string is specified, .\"0 .ZN XDisplayName .\"0 looks in the environment for the display and returns the display name that .\"0 .ZN XOpenDisplay .\"0 would attempt to use. NULL 文字列が指定された場合には .ZN XDisplayName はディスプレイについての環境変数を調べ、 .ZN XOpenDisplay が使おうとするディスプレイの名前を返す。 .\"0 This makes it easier to report to the user precisely which display the .\"0 program attempted to open when the initial connection attempt failed. この関数を使うことにより、最初の接続の試みが失敗した時に、プログラムが どのディスプレイを開こうとしていたのかをユーザに知らせることが容易になる。 .LP .\"0 The .\"0 .ZN XSetIOErrorHandler .\"0 sets the fatal I/O error handler. .ZN XSetIOErrorHandler は致命的な I/O エラーのハンドラを設定する。 .\"0 Xlib calls the program's supplied error handler if any sort of system call .\"0 error occurs (for example, the connection to the server was lost). システムコールレベルのエラー(例えば、サーバへの接続が失われた)が発生し た場合に、Xlib はユーザが与えたエラーハンドラを呼び出す。 .\"0 This is assumed to be a fatal condition, .\"0 and the called routine should not return. これは致命的な状態と考えられるので、呼び出されたルーチンからは復帰すべ きではない。 .\"0 If the I/O error handler does return, .\"0 the client process exits. I/O エラーハンドラから復帰させても、クライアントプロセスは終了する。 .LP .\"0 Note that the previous error handler is returned. 直前のエラーハンドラが返される点に注意すること。 .LP .\"0 The .\"0 .ZN XGetErrorDatabaseText .\"0 function returns a null-terminated message .\"0 (or the default message) from the error message .\"0 database. 関数 .ZN XGetErrorDatabaseText は、エラーメッセージのデータベースからメッセージ(あるいはデフォルトの メッセージ)を返す。 このメッセージは NULL で終端する。 .\"0 Xlib uses this function internally to look up its error messages. Xlib はこの関数を内部的に使ってエラーメッセージを見つける。 .\"0 The text in the default_string argument is assumed .\"0 to be in the encoding of the current locale, .\"0 and the text stored in the buffer_return argument .\"0 is in the encoding of the current locale. 引き数 default_string 内のテキストは現在のロケールのエンコーディングであ り、引き数 buffer_return に格納されるテキストも現在のロケールの エンコーディングであることが前提となる。 .LP .\"0 The name argument should generally be the name of your application. 引き数 name は普通はアプリケーションの名前にすべきである。 .\"0 The message argument should indicate which type of error message you want. 引き数 message では必要なメッセージのタイプを示すべきである。 .\"0 If the name and message are not in the Host Portable Character Encoding, .\"0 the result is implementation-dependent. name と message のエンコーディングがホストポータブル文字エンコーディング でない場合、実行結果は実装依存である。 .\"0 Xlib uses three predefined ``application names'' to report errors. Xlib は予め定義された 3 つの ``アプリケーション名'' を使って エラーを報告する。 .\"0 In these names, .\"0 uppercase and lowercase matter. これらの名前においては、大文字と小文字は区別される。 .IP XProtoError 1i .\"0 The protocol error number is used as a string for the message argument. プロトコルエラー番号は、引き数 message に対する文字列として使用される。 .IP XlibMessage 1i .\"0 These are the message strings that are used internally by the library. これらは、ライブラリが内部的に使うメッセージ文字列である。 .IP XRequest 1i .\"0 For a core protocol request, .\"0 the major request protocol number is used for the message argument. コアプロトコルリクエストの場合は、 メジャーリクエストプロトコル番号が引き数 message に対して使われる。 .\"0 For an extension request, .\"0 the extension name (as given by .\"0 .ZN InitExtension ) .\"0 followed by a period (\.) and the minor request protocol number .\"0 is used for the message argument. 拡張リクエストの場合は、拡張名( .ZN InitExtension で与えられる )、ピリオド(\.)、 マイナーリクエストプロトコル番号の 3 つを並べたものが 引き数 message に対して使用される。 .\"0 If no string is found in the error database, .\"0 the default_string is returned to the buffer argument. エラーデータベースで文字列が見つからない場合には、default_string が引き数 buffer に返される。 .SH 関連項目 XOpenDisplay(3X11), XSynchronize(3X11) .br \fI\*(xL\fP