~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to libdb/docs/ref/simple_tut/errors.html

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<!--$Id$-->
2
 
<!--Copyright 1997-2002 by Sleepycat Software, Inc.-->
3
 
<!--All rights reserved.-->
4
 
<!--See the file LICENSE for redistribution information.-->
5
 
<html>
6
 
<head>
7
 
<title>Berkeley DB Reference Guide: Error returns</title>
8
 
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
9
 
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,java,C,C++">
10
 
</head>
11
 
<body bgcolor=white>
12
 
<table width="100%"><tr valign=top>
13
 
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Simple Tutorial</dl></h3></td>
14
 
<td align=right><a href="../../ref/simple_tut/handles.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/simple_tut/open.html"><img src="../../images/next.gif" alt="Next"></a>
15
 
</td></tr></table>
16
 
<p>
17
 
<h1 align=center>Error returns</h1>
18
 
<p>The Berkeley DB interfaces always return a value of 0 on success.  If the
19
 
operation does not succeed for any reason, the return value will be
20
 
non-zero.
21
 
<p>If a system error occurred (for example, Berkeley DB ran out of disk space,
22
 
or permission to access a file was denied, or an illegal argument was
23
 
specified to one of the interfaces), Berkeley DB returns an <b>errno</b>
24
 
value.  All of the possible values of <b>errno</b> are greater than
25
 
0.
26
 
<p>If the operation didn't fail due to a system error, but wasn't
27
 
successful either, Berkeley DB returns a special error value.  For example,
28
 
if you tried to retrieve the data item associated with the key
29
 
<b>fruit</b>, and there was no such key/data pair in the database,
30
 
Berkeley DB would return <a href="../../ref/program/errorret.html#DB_NOTFOUND">DB_NOTFOUND</a>, a special error value that means
31
 
the requested key does not appear in the database.  All of the possible
32
 
special error values are less than 0.
33
 
<p>Berkeley DB also offers programmatic support for displaying error return values.
34
 
First, the <a href="../../api_c/env_strerror.html">db_strerror</a> interface returns a pointer to the error
35
 
message corresponding to any Berkeley DB error return, similar to the ANSI C
36
 
strerror interface, but is able to handle both system error returns and
37
 
Berkeley DB-specific return values.
38
 
<p>Second, there are two error functions, <a href="../../api_c/db_err.html">DB-&gt;err</a> and <a href="../../api_c/db_err.html">DB-&gt;errx</a>.
39
 
These functions work like the ANSI C printf interface, taking a
40
 
printf-style format string and argument list, and optionally appending
41
 
the standard error string to a message constructed from the format string
42
 
and other arguments.
43
 
<table width="100%"><tr><td><br></td><td align=right><a href="../../ref/simple_tut/handles.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../reftoc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/simple_tut/open.html"><img src="../../images/next.gif" alt="Next"></a>
44
 
</td></tr></table>
45
 
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
46
 
</body>
47
 
</html>