diff options
Diffstat (limited to 'log.cc')
-rw-r--r-- | log.cc | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#include "log.h" + +#include <absl/strings/substitute.h> +#include <stdlib.h> + +namespace gsrsup { + +void Check(Log& log, bool condition, const char* condition_str, + const char* file, int line) { + if (!condition) { + log.Error(absl::Substitute("internal error ($0:$1): ", file, line), + condition_str); + exit(1); + } +} + +} // namespace gsrsup |