Last change
on this file since 6607 was
6607,
checked in by acosce, 10 months ago
|
XIOS used for ICOLMDZORINCA_CO2_Transport_GMD_2023
|
File size:
363 bytes
|
Rev | Line | |
---|
[6607] | 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.