Exception.cpp 651 B

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