コード例 #1
0
ファイル: gmx_fatal.c プロジェクト: aar2163/GROMACS
void print_warn_num(bool bFatalError)
{
  print_warn_count("note",nwarn_note);

  print_warn_count("warning",nwarn_warn);

  if (bFatalError && nwarn_warn > maxwarn) {
    gmx_fatal(FARGS,"Too many warnings (%d), %s terminated.\n"
	      "If you are sure all warnings are harmless, use the -maxwarn option.",nwarn_warn,Program());
  }
}
コード例 #2
0
ファイル: warninp.cpp プロジェクト: MelroLeandro/gromacs
void check_warning_error(warninp_t wi, int f_errno, const char *file, int line)
{
    if (wi->nwarn_error > 0)
    {
        print_warn_count("note", wi->nwarn_note);
        print_warn_count("warning", wi->nwarn_warn);

        gmx_fatal(f_errno, file, line, "There %s %d error%s in input file(s)",
                  (wi->nwarn_error == 1) ? "was" : "were", wi->nwarn_error,
                  (wi->nwarn_error == 1) ? ""    : "s");
    }
}
コード例 #3
0
ファイル: warninp.cpp プロジェクト: MelroLeandro/gromacs
void done_warning(warninp_t wi, int f_errno, const char *file, int line)
{
    print_warn_count("note", wi->nwarn_note);
    print_warn_count("warning", wi->nwarn_warn);

    check_warning_error(wi, f_errno, file, line);

    if (wi->maxwarn >= 0 && wi->nwarn_warn > wi->maxwarn)
    {
        gmx_fatal(f_errno, file, line,
                  "Too many warnings (%d).\n"
                  "If you are sure all warnings are harmless, use the -maxwarn option.",
                  wi->nwarn_warn);
    }

    free_warning(wi);
}