forked from hunter-packages/arrayfire
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.hpp
More file actions
23 lines (19 loc) · 891 Bytes
/
error.hpp
File metadata and controls
23 lines (19 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*******************************************************
* Copyright (c) 2014, ArrayFire
* All rights reserved.
*
* This file is distributed under 3-clause BSD license.
* The complete license agreement can be obtained at:
* http://arrayfire.com/licenses/BSD-3-Clause
********************************************************/
#include <af/exception.h>
#define AF_THROW(fn) do { \
af_err __err = fn; \
if (__err == AF_SUCCESS) break; \
throw af::exception(__FILE__, __LINE__, __err); \
} while(0)
#define AF_THROW_MSG(__msg, __err) do { \
if (__err == AF_SUCCESS) break; \
throw af::exception(__msg, __FILE__, __LINE__, __err); \
} while(0);
#define THROW(__err) throw af::exception(__FILE__, __LINE__, __err)