Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Perkins
ducc
Commits
f9d3bc20
Commit
f9d3bc20
authored
Jan 23, 2020
by
Martin Reinecke
Browse files
remove error_handling.cc
parent
9b34409f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Makefile.am
View file @
f9d3bc20
...
...
@@ -17,7 +17,6 @@ libmrutil_la_SOURCES = \
mr_util/pointing.h
\
mr_util/vec3.h
\
mr_util/constants.h
\
mr_util/error_handling.cc
\
mr_util/error_handling.h
\
mr_util/space_filling.cc
\
mr_util/space_filling.h
\
...
...
mr_util/error_handling.cc
deleted
100644 → 0
View file @
9b34409f
/*
* This file is part of the MR utility library.
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this code; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/* Copyright (C) 2019 Max-Planck-Society
Author: Martin Reinecke */
#include
"mr_util/error_handling.h"
using
namespace
std
;
namespace
mr
{
namespace
detail_error_handling
{
bool
abort_in_progress__
=
false
;
ostream
&
CodeLocation
::
print
(
ostream
&
os
)
const
{
os
<<
file
<<
": "
<<
line
;
if
(
func
)
os
<<
" ("
<<
func
<<
")"
;
os
<<
":
\n
"
;
return
os
;
}
void
killjob__
()
{
// perhaps print stack trace?
exit
(
1
);
}
}}
mr_util/error_handling.h
View file @
f9d3bc20
...
...
@@ -23,7 +23,7 @@
#define MRUTIL_ERROR_HANDLING_H
#include
<iostream>
#include
<
cstdlib
>
#include
<
exception
>
namespace
mr
{
...
...
@@ -37,13 +37,8 @@ namespace detail_error_handling {
#define MR_fail(...) \
do { \
if (!::mr::detail_error_handling::abort_in_progress__) \
{ \
::mr::detail_error_handling::abort_in_progress__ = true; \
::mr::detail_error_handling::streamDump__(::std::cerr, MRUTIL_ERROR_HANDLING_LOC_, "\n", ##__VA_ARGS__, "\n"); \
::mr::detail_error_handling::killjob__(); \
} \
::std::exit(1); \
::mr::detail_error_handling::streamDump__(::std::cerr, MRUTIL_ERROR_HANDLING_LOC_, "\n", ##__VA_ARGS__, "\n"); \
throw ::std::runtime_error("error exit"); \
} while(0)
#define MR_assert(cond,...) \
...
...
@@ -69,8 +64,13 @@ class CodeLocation
inline
::
std
::
ostream
&
operator
<<
(
::
std
::
ostream
&
os
,
const
CodeLocation
&
loc
)
{
return
loc
.
print
(
os
);
}
extern
bool
abort_in_progress__
;
void
killjob__
();
inline
std
::
ostream
&
CodeLocation
::
print
(
std
::
ostream
&
os
)
const
{
os
<<
file
<<
": "
<<
line
;
if
(
func
)
os
<<
" ("
<<
func
<<
")"
;
os
<<
":
\n
"
;
return
os
;
}
#if (__cplusplus>=201703L) // hyper-elegant C++2017 version
template
<
typename
...
Args
>
...
...
nifty_gridder/setup.py
View file @
f9d3bc20
...
...
@@ -32,7 +32,7 @@ else:
def
get_extension_modules
():
return
[
Extension
(
'nifty_gridder'
,
sources
=
[
'nifty_gridder.cc'
,
'../mr_util/threading.cc'
,
'../mr_util/error_handling.cc'
],
sources
=
[
'nifty_gridder.cc'
,
'../mr_util/threading.cc'
],
depends
=
[
'../mr_util/error_handling.h'
,
'../mr_util/fft.h'
,
'../mr_util/threading.h'
,
'../mr_util/aligned_array.h'
,
'../mr_util/simd.h'
,
'../mr_util/mav.h'
,
'../mr_util/cmplx.h'
,
'../mr_util/unity_roots.h'
,
...
...
pypocketfft/setup.py
View file @
f9d3bc20
...
...
@@ -36,7 +36,7 @@ else:
def
get_extension_modules
():
return
[
Extension
(
'pypocketfft'
,
language
=
'c++'
,
sources
=
[
'pypocketfft.cc'
,
'../mr_util/threading.cc'
,
'../mr_util/error_handling.cc'
],
sources
=
[
'pypocketfft.cc'
,
'../mr_util/threading.cc'
],
depends
=
[
'../mr_util/fft.h'
,
'../mr_util/mav.h'
,
'../mr_util/threading.h'
,
'../mr_util/aligned_array.h'
,
'../mr_util/simd.h'
,
'../mr_util/cmplx.h'
,
'../mr_util/unity_roots.h'
,
'../mr_util/error_handling.h'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment