gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: libgnunetutil: add GNUNET_a


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: libgnunetutil: add GNUNET_assert_from()
Date: Fri, 02 Dec 2016 10:41:57 +0100

This is an automated email from the git hooks/post-receive script.

mteich pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new c7bd34d  libgnunetutil: add GNUNET_assert_from()
c7bd34d is described below

commit c7bd34d154729521cf1ea959550957759207dcf2
Author: Markus Teich <address@hidden>
AuthorDate: Fri Dec 2 10:41:46 2016 +0100

    libgnunetutil: add GNUNET_assert_from()
---
 src/include/gnunet_common.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index dcd0c60..8975021 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -654,6 +654,16 @@ GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
 
 /**
  * @ingroup logging
+ * Use this for fatal errors that cannot be handled
+ * 
+ * @param cond Condition to evaluate
+ * @param comp Component string to use for logging
+ */
+#define GNUNET_assert_from(cond, comp) do { if (! (cond)) { 
GNUNET_log_from(GNUNET_ERROR_TYPE_ERROR, comp, _("Assertion failed at 
%s:%d.\n"), __FILE__, __LINE__); GNUNET_abort_(); } } while(0)
+
+
+/**
+ * @ingroup logging
  * Use this for internal assertion violations that are
  * not fatal (can be handled) but should not occur.
  */

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]