error.so

来自「berkeley db 4.6.21的源码。berkeley db是一个简单的数」· SO 代码 · 共 48 行

SO
48
字号
m4_comment([$Id: error.so,v 10.22 2003/10/18 19:15:56 bostic Exp $])m4_ref_title(Access Methods,    Error support, @error handling, am_misc/perm, am_misc/stability)m4_p([dnlm4_db offers programmatic support for displaying error return values.])m4_p([dnlThe m4_ref(dbenv_strerror) function returns a pointer to the errormessage corresponding to any m4_db error return, similar to the ANSI Cstrerror function, but is able to handle both system error returns andm4_db specific return values.])m4_p([dnlFor example:])include(ref/am_misc/error1.cs)m4_p([dnlThere are also two additional error methods, m4_ref(dbh_err) andm4_ref(dbh_errx).  These methods work like the m4_ansic_name printffunction, taking a printf-style format string and argument list, andwriting a message constructed from the format string and arguments.])m4_p([dnlThe m4_refT(dbh_err) appends the standard error string to theconstructed message; the m4_refT(dbh_errx) does not.  These methodsprovide simpler ways of displaying m4_db error messages.  For example,if your application tracks session IDs in a variable called session_id,it can include that information in its error messages:])m4_p([dnlError messages can additionally be configured to always include a prefix(for example, the program name) using the m4_refT(dbh_set_errpfx).])include(ref/am_misc/error2.cs)m4_p([dnlFor example, if the program were called my_app and the open call returnedan EACCESS system error, the error messages shown would appear as follows:])m4_indent([dnlmy_app: access.db: Permission denied.my_app: contact your system administrator: session ID was 14])m4_page_footer

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?