Pixar Arch 0.25.8
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 "pxr/arch/pxr.h"
15#include "pxr/arch/api.h"
16#include "pxr/arch/defines.h"
18#include <stddef.h>
19
20ARCH_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
52#define ARCH_ERROR(msg) \
53 ARCH_NS::Arch_Error(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
54
60#define ARCH_WARNING(msg) \
61 ARCH_NS::Arch_Warning(msg, __ARCH_FUNCTION__, __LINE__, __ARCH_FILE__)
62
65#define ARCH_AXIOM(cond) \
66 if (!(cond)) ARCH_ERROR("[" #cond "] axiom failed")
67
68ARCH_NAMESPACE_CLOSE_SCOPE
69
70#endif // PXR_ARCH_ERROR_H
Define preprocessor function name macros.