blob: 0f4e377ddddec7f884c4dd5ab6ed8d725e0358d8 [file] [log] [blame]
Parker Schuhd3b7a8872018-02-19 16:42:27 -08001/*----------------------------------------------------------------------------*/
2/* Copyright (c) FIRST 2008-2017. All Rights Reserved. */
3/* Open Source Software - may be modified and shared by FRC teams. The code */
4/* must be accompanied by the FIRST BSD license file in the root directory of */
5/* the project. */
6/*----------------------------------------------------------------------------*/
7
8#pragma once
9
10#include "frc971/wpilib/ahal/Base.h"
11#include "llvm/StringRef.h"
12
13#define wpi_setErrnoErrorWithContext(context) \
14 this->SetErrnoError((context), __FILE__, __FUNCTION__, __LINE__)
15#define wpi_setErrnoError() wpi_setErrnoErrorWithContext("")
16#define wpi_setImaqErrorWithContext(code, context) \
17 do { \
18 } while (0)
19#define wpi_setErrorWithContext(code, context) \
20 do { \
21 } while (0)
22#define wpi_setErrorWithContextRange(code, min, max, req, context) \
23 do { \
24 } while (0)
25#define wpi_setError(code) wpi_setErrorWithContext(code, "")
26#define wpi_setStaticErrorWithContext(object, code, context) \
27 do { \
28 } while (0)
29#define wpi_setStaticError(object, code) \
30 wpi_setStaticErrorWithContext(object, code, "")
31#define wpi_setGlobalErrorWithContext(code, context) \
32 do { \
33 } while (0)
34#define wpi_setGlobalError(code) wpi_setGlobalErrorWithContext(code, "")
35#define wpi_setWPIErrorWithContext(error, context) \
36 do { \
37 } while (0)
38#define wpi_setWPIError(error) wpi_setWPIErrorWithContext(error, "")
39#define wpi_setStaticWPIErrorWithContext(object, error, context) \
40 object->SetWPIError((wpi_error_s_##error), (context), __FILE__, \
41 __FUNCTION__, __LINE__)
42#define wpi_setStaticWPIError(object, error) \
43 wpi_setStaticWPIErrorWithContext(object, error, "")
44#define wpi_setGlobalWPIErrorWithContext(error, context) \
45 ::frc::ErrorBase::SetGlobalWPIError((wpi_error_s_##error), (context), \
46 __FILE__, __FUNCTION__, __LINE__)
47#define wpi_setGlobalWPIError(error) wpi_setGlobalWPIErrorWithContext(error, "")
48
49namespace frc {
50
51inline bool StatusIsFatal() { return false; }
52
53} // namespace frc