?¡ëPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À?¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
|
![]() ![]() ![]() |
Error support
Berkeley DB offers programmatic support for displaying error return values. The db_strerror function returns a pointer to the error message corresponding to any Berkeley DB error return. This is similar to the ANSI C strerror interface, but can handle both system error returns and Berkeley DB-specific return values.
For example:
int ret; if ((ret = dbenv->set_cachesize(dbenv, 0, 32 * 1024, 1)) != 0) { fprintf(stderr, "set_cachesize failed: %s\n", db_strerror(ret)); return (1); }
There are also two additional error methods: DB_ENV->err and DB_ENV->errx. These methods work like the ANSI C printf function, taking a printf-style format string and argument list, and writing a message constructed from the format string and arguments.
The DB_ENV->err function appends the standard error string to the constructed message; the DB_ENV->errx function does not.
Error messages can be configured always to include a prefix (for example, the program name) using the DB_ENV->set_errpfx method.
These functions provide simpler ways of displaying Berkeley DB error messages:
int ret; dbenv->set_errpfx(dbenv, program_name); if ((ret = dbenv->open(dbenv, home, DB_CREATE | DB_INIT_LOG | DB_INIT_TXN | DB_USE_ENVIRON, 0)) != 0) { dbenv->err(dbenv, ret, "open: %s", home); dbenv->errx(dbenv, "contact your system administrator: session ID was %d", session_id); return (1); }
For example, if the program was called "my_app", and it tried to open an environment home directory in "/tmp/home" and the open call returned a permission error, the error messages shown would look like this:
my_app: open: /tmp/home: Permission denied. my_app: contact your system administrator: session ID was 2
![]() ![]() ![]() |
Copyright (c) 1996,2008 Oracle. All rights reserved.