Pixar Arch
Loading...
Searching...
No Matches
error.h
Go to the documentation of this file.
1// Copyright 2016 Pixar
2//
3// Licensed under the terms set forth in the LICENSE.txt file available at
4// https://openusd.org/license.
5//
6// Modified by Jeremy Retailleau.
7
8#ifndef PXR_ARCH_ERROR_H
9#define PXR_ARCH_ERROR_H
10
13
14#include "./api.h"
15#include "./defines.h"
16#include "./functionLite.h"
17#include <stddef.h>
18
19namespace pxr {
20
29[[noreturn]]
30ARCH_API
31void Arch_Error(const char* msg, const char* funcName,
32 size_t lineNo, const char* fileName);
33
42ARCH_API
43void Arch_Warning(const char* msg, const char* funcName,
44 size_t lineNo, const char* fileName);
45
51#define ARCH_ERROR(msg) \
52 pxr::Arch_Error(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
53
59#define ARCH_WARNING(msg) \
60 pxr::Arch_Warning(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
61
64#define ARCH_AXIOM(cond) \
65 if (!(cond)) ARCH_ERROR("[" #cond "] axiom failed")
66
67} // namespace pxr
68
69#endif // PXR_ARCH_ERROR_H
Define preprocessor function name macros.