-
Notifications
You must be signed in to change notification settings - Fork 87
Expand file tree
/
Copy pathCommon.h
More file actions
36 lines (30 loc) · 1.15 KB
/
Common.h
File metadata and controls
36 lines (30 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) Microsoft Corporation.
// Copyright (C) 2025 IAMAI CONSULTING CORP
//
// MIT License. All rights reserved.
#pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace microsoft {
namespace projectairsim {
namespace client {
// Array of bytes
typedef std::vector<std::uint8_t> VecB;
// Array of string
typedef std::vector<std::string> VecStr;
// Macro to catch Status exceptions and return it
#define RETURN_CATCH_STATUS(s) \
do { \
try { \
return (s); \
} catch (Status status_caught) { \
return (status_caught); \
} catch (std::exception e) { \
log.Error(std::string("Caught exception: ") + e.what()); \
return (Status::Failed); \
} \
} while (true)
} // namespace client
} // namespace projectairsim
} // namespace microsoft