Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Commit

Permalink
[athena-cython] debugger info
Browse files Browse the repository at this point in the history
  • Loading branch information
hotpxl committed May 20, 2015
1 parent 1bc2ade commit ada7bbc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions minerva/common/common.cpp
@@ -0,0 +1,20 @@
#include "./common.h"
#include <cstdarg>
#include <dmlc/logging.h>

namespace minerva {
namespace common {

void FatalError(char const* format, ...) {
char buffer[4096];
va_list va;
va_start(va, format);
vsprintf(buffer, format, va);
va_end(va);
LOG(FATAL) << buffer;
abort();
}

} // namespace common
} // namespace minerva

3 changes: 3 additions & 0 deletions minerva/common/common.h
Expand Up @@ -72,6 +72,9 @@ std::string FString(char const* format, Args&&... args) {
return std::string(buffer);
}

void FatalError(char const* format, ...)
__attribute__((format(printf, 1, 2), noreturn));

} // namespace common
} // namespace minerva

0 comments on commit ada7bbc

Please sign in to comment.