Exemple #1
0
void freadLastWarning(const char *format, ...) {
  va_list args;
  va_start(args, format);
  static char msg[2000];
  vsnprintf(msg, 2000, format, args);
  va_end(args);
  freadCleanup();
  warning(msg);
}
Exemple #2
0
void STOP(const char *format, ...) {
  // Solves: http://stackoverflow.com/questions/18597123/fread-data-table-locks-files
  // TODO: always include fnam in the STOP message. For log files etc.
  va_list args;
  va_start(args, format);
  char msg[2000];
  vsnprintf(msg, 2000, format, args);
  va_end(args);
  freadCleanup();
  error("%s", msg);
}
Exemple #3
0
void __halt(bool warn, const char *format, ...) {
  // Solves: http://stackoverflow.com/questions/18597123/fread-data-table-locks-files
  // TODO: always include fnam in the STOP message. For log files etc.
  va_list args;
  va_start(args, format);
  char msg[2000];
  vsnprintf(msg, 2000, format, args);
  va_end(args);
  freadCleanup(); // this closes mmp hence why we just copied substrings from mmp to msg[] first since mmp is now invalid
  if (warn) warning("%s", msg);  // include "%s" because data in msg might include '%'
  else error("%s", msg);
}