blob: a50fe7c96b15066816e40ebea9da830ddf54578b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
//
// Copyright 2019 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
extern "C" {
#include "mpm/rfdc/rfdc_throw.h"
}
#include <mpm/exception.hpp>
#include <string>
/**
* A function to throw MPM exceptions from within the Xilinx RFdc API
*/
void rfdc_throw(const char* msg)
{
if (msg) {
std::string error_msg(msg);
throw mpm::assertion_error("Error in RFDC code: " + error_msg);
} else {
throw mpm::assertion_error("Error in RFDC code.");
}
}
|