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

« back to all changes in this revision

Viewing changes to addressbook/libebook/e-error.h

  • 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
/**
 
2
 * e_return_error_if_fail:
 
3
 *
 
4
 * FIXME Document me!
 
5
 *
 
6
 * Since: 2.30
 
7
 **/
 
8
#define e_return_error_if_fail(expr,error_code) G_STMT_START{           \
 
9
     if G_LIKELY(expr) { } else                                         \
 
10
       {                                                                \
 
11
         g_log (G_LOG_DOMAIN,                                           \
 
12
                G_LOG_LEVEL_CRITICAL,                                   \
 
13
                "file %s: line %d (%s): assertion `%s' failed",         \
 
14
                __FILE__,                                               \
 
15
                __LINE__,                                               \
 
16
                G_STRFUNC,                                      \
 
17
                #expr);                                                 \
 
18
         g_set_error (error, E_BOOK_ERROR, (error_code),                \
 
19
                "file %s: line %d (%s): assertion `%s' failed",         \
 
20
                __FILE__,                                               \
 
21
                __LINE__,                                               \
 
22
                G_STRFUNC,                                      \
 
23
                #expr);                                                 \
 
24
         return FALSE;                                                  \
 
25
       };                               }G_STMT_END
 
26
 
 
27
#define e_return_async_error_if_fail(expr, error) G_STMT_START { \
 
28
    if G_LIKELY (expr) {} else {                                 \
 
29
      g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,                 \
 
30
             "file %s: line %d (%s): assertion `%s' failed",     \
 
31
             __FILE__, __LINE__, G_STRFUNC, #expr);    \
 
32
      cb (book, error, closure);                           \
 
33
      return 0;                                                  \
 
34
    }                                                            \
 
35
  } G_STMT_END                                                   \
 
36
 
 
37
#define e_return_async_error_val_if_fail(expr, error) G_STMT_START { \
 
38
    if G_LIKELY (expr) {} else {                                 \
 
39
      g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,                 \
 
40
             "file %s: line %d (%s): assertion `%s' failed",     \
 
41
             __FILE__, __LINE__, G_STRFUNC, #expr);    \
 
42
      cb (book, error, NULL, closure);                           \
 
43
      return 0;                                                  \
 
44
    }                                                            \
 
45
  } G_STMT_END                                                   \
 
46