Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: cc3000_ping_demo_try_2
Fork of mbed by
Diff: Debug.h
- Revision:
- 4:5d1359a283bc
- Parent:
- 1:6b7f447ca868
- Child:
- 5:62573be585e9
--- a/Debug.h Fri Nov 14 15:25:20 2008 +0000
+++ b/Debug.h Thu Nov 27 16:23:24 2008 +0000
@@ -5,8 +5,6 @@
#ifndef MBED_DEBUG_H
#define MBED_DEBUG_H
-#include "DebugTracer.h"
-
namespace mbed {
/* Section: debug
@@ -25,11 +23,11 @@
void ERROR(const char* format, ...);
#endif
-#define ERROR(...) mbed_error(__FILE__, __LINE__, __VA_ARGS__)
-void mbed_error(const char* file, int line, const char* fmt, ...);
+#define ERROR(FMT, ...) mbed_error(__FILE__, __LINE__, FMT, ##__VA_ARGS__)
+void mbed_error(const char* file, int line, const char* fmt=0, ...) __attribute__((noreturn));
// Internal use for "official" errors
-void mbed_error(const char* file, int line, int code, const char* fmt, ...);
+void mbed_error(const char* file, int line, int code, const char* fmt=0, ...) __attribute__((noreturn));
// As seen by user, for documentation purposes only
#if 0
@@ -46,11 +44,7 @@
void ASSERT(int condition, const char* fmt = 0, ...);
#endif
-#define ASSERT(...) mbed_assert(__FILE__, __LINE__, __VA_ARGS__)
-void mbed_assert(const char* file, int line, int condition, const char* fmt = 0, ...);
-
-// Internal use for "official" errors
-void mbed_assert(const char* file, int line, int condition, int code, const char* fmt = 0, ...);
+#define ASSERT(COND, ...) (COND ? (void)0 : mbed_error(__FILE__, __LINE__, ##__VA_ARGS__))
// As seen by user, for documentation purposes only
#if 0
