Exception.cpp 642 B

1234567891011121314151617
  1. #include <cstdio>
  2. #include <cstring>
  3. #include "Exception.h"
  4. using namespace std;
  5. //======================================================================================================================
  6. // init =
  7. //======================================================================================================================
  8. void Exception::init(const char* err_, const char* file, int line, const char* func)
  9. {
  10. char tmpStr[1024];
  11. sprintf(tmpStr, "Exception (%s:%d %s): %s", file, line, func, err_);
  12. err = tmpStr;
  13. }