NumCpp
2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Variables
a
c
d
e
g
h
i
j
m
n
o
p
s
t
v
Typedefs
Enumerations
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
c
d
e
i
l
m
n
p
r
s
t
v
x
y
z
Typedefs
a
c
d
i
p
r
s
t
v
Enumerations
Related Symbols
Files
File List
Globals
All
Macros
Examples
▼
NumCpp
Release Notes
Installation
Building
Flags
►
Namespaces
►
Data Structures
▼
Files
►
File List
►
Globals
►
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Error.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include <iostream>
31
#include <stdexcept>
32
#include <string>
33
34
#include "
NumCpp/Core/Types.hpp
"
35
36
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
37
#define THROW_INVALID_ARGUMENT_ERROR(msg) \
38
nc::error::throwError<std::invalid_argument>(__FILE__, __func__, __LINE__, msg)
37
#define THROW_INVALID_ARGUMENT_ERROR(msg) \
…
39
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
40
#define THROW_RUNTIME_ERROR(msg) nc::error::throwError<std::runtime_error>(__FILE__, __func__, __LINE__, msg)
41
42
namespace
nc::error
43
{
44
//============================================================================
52
template
<
typename
ErrorType>
53
void
throwError
(
const
std::string&
file
,
const
std::string&
function
,
uint32
line
,
const
std::string&
msg
=
""
)
54
{
55
std::string
errMsg
=
56
"File: "
+
file
+
"\n\tFunction: "
+
function
+
"\n\tLine: "
+ std::to_string(
line
) +
"\n\tError: "
+
msg
;
57
std::cerr <<
errMsg
;
58
throw
ErrorType
(
errMsg
);
59
}
53
void
throwError
(
const
std::string&
file
,
const
std::string&
function
,
uint32
line
,
const
std::string&
msg
=
""
) {
…
}
60
}
// namespace nc::error
42
namespace
nc::error
{
…
}
Types.hpp
nc::error
Definition
Error.hpp:43
nc::error::throwError
void throwError(const std::string &file, const std::string &function, uint32 line, const std::string &msg="")
Definition
Error.hpp:53
nc::arange
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition
arange.hpp:59
nc::uint32
std::uint32_t uint32
Definition
Types.hpp:40
include
NumCpp
Core
Internal
Error.hpp
Generated by
1.9.8