| Index: tools/traceline/traceline/logging.h
|
| diff --git a/tools/traceline/traceline/logging.h b/tools/traceline/traceline/logging.h
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..bf2e4fa068407cf0703bda72ec34ab3ccf680046
|
| --- /dev/null
|
| +++ b/tools/traceline/traceline/logging.h
|
| @@ -0,0 +1,28 @@
|
| +// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef TRACELINE_LOGGING_H_
|
| +#define TRACELINE_LOGGING_H_
|
| +
|
| +#include <windows.h>
|
| +#include <stdio.h>
|
| +
|
| +#define CHECK(exp, ...) \
|
| + if (!(exp)) { \
|
| + printf("FAILED CHECK: %s\n %s:%d\n", #exp, __FILE__, __LINE__); \
|
| + printf("\naborted.\n"); \
|
| + if (::IsDebuggerPresent()) __debugbreak(); \
|
| + exit(1); \
|
| + }
|
| +
|
| +#define NOTREACHED(...) \
|
| + if (1) { \
|
| + printf("NOTREACHED:\n %s:%d\n", __FILE__, __LINE__); \
|
| + printf(__VA_ARGS__); \
|
| + printf("\naborted.\n"); \
|
| + if (::IsDebuggerPresent()) __debugbreak(); \
|
| + exit(1); \
|
| + }
|
| +
|
| +#endif // TRACELINE_LOGGING_H_
|
|
|