WPILibC++ 2027.0.0-alpha-5
Loading...
Searching...
No Matches
ErrorHandling.hpp
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <stdint.h>
8
9#include <string_view>
10
11#include "wpi/hal/Types.h"
12
13namespace wpi::hal {
14[[nodiscard]]
15HAL_Status MakeError(HAL_Status status, std::string_view value);
16
17[[nodiscard]]
18HAL_Status MakeErrorIndexOutOfRange(HAL_Status status, std::string_view message,
19 int32_t minimum, int32_t maximum,
20 int32_t channel);
21
22[[nodiscard]]
24 std::string_view message,
25 int32_t channel,
26 std::string_view previousAllocation);
27} // namespace wpi::hal
int32_t HAL_Status
Definition Types.h:67
WPILib Hardware Abstraction Layer (HAL) namespace.
Definition Types.hpp:9
HAL_Status MakeErrorIndexOutOfRange(HAL_Status status, std::string_view message, int32_t minimum, int32_t maximum, int32_t channel)
HAL_Status MakeError(HAL_Status status, std::string_view value)
HAL_Status MakeErrorPreviouslyAllocated(HAL_Status status, std::string_view message, int32_t channel, std::string_view previousAllocation)