All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
error.h
Go to the documentation of this file.
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_BASE_ARCH_ERROR_H
8#define PXR_BASE_ARCH_ERROR_H
9
13
14#include "pxr/pxr.h"
15#include "pxr/base/arch/api.h"
16#include "pxr/base/arch/defines.h"
18#include <stddef.h>
19
20PXR_NAMESPACE_OPEN_SCOPE
21
30[[noreturn]]
31ARCH_API
32void Arch_Error(const char* msg, const char* funcName,
33 size_t lineNo, const char* fileName);
34
43ARCH_API
44void Arch_Warning(const char* msg, const char* funcName,
45 size_t lineNo, const char* fileName);
46
49
55#define ARCH_ERROR(msg) \
56 Arch_Error(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
57
63#define ARCH_WARNING(msg) \
64 Arch_Warning(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
65
68#define ARCH_AXIOM(cond) \
69 if (!(cond)) ARCH_ERROR("[" #cond "] axiom failed")
70
72
73PXR_NAMESPACE_CLOSE_SCOPE
74
75#endif // PXR_BASE_ARCH_ERROR_H
Define preprocessor function name macros.