source:
XIOS/dev/dev_olga/src/extern/remap/src/errhandle.hpp
@
1022
Last change on this file since 1022 was 1022, checked in by mhnguyen, 7 years ago | |
---|---|
File size: 363 bytes |
Line | |
---|---|
1 | #ifndef __ERRHANDLE_H__ |
2 | #define __ERRHANDLE_H__ |
3 | |
4 | #include <stdlib.h> |
5 | #include <iostream> |
6 | #include <string> |
7 | |
8 | namespace sphereRemap { |
9 | |
10 | static inline void error_exit(const std::string& msg) |
11 | { |
12 | std::cerr << "Error: " << msg << std::endl; |
13 | exit(0); |
14 | } |
15 | |
16 | static inline void exit_on_failure(int status, const std::string& msg) |
17 | { |
18 | if (status) error_exit(msg); |
19 | } |
20 | |
21 | } |
22 | #endif |
Note: See TracBrowser
for help on using the repository browser.