source: git/Singular/dError.c @ 50cbdc

spielwiese
Last change on this file since 50cbdc was 50cbdc, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: merge-2-0-2 git-svn-id: file:///usr/local/Singular/svn/trunk@5619 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.6 KB
Line 
1/****************************************
2*  Computer Algebra System SINGULAR     *
3****************************************/
4/***************************************************************
5 *  File:    dError.c
6 *  Purpose: implementation for debug error handling
7 *  Author:  obachman (Olaf Bachmann)
8 *  Created: 9/00
9 *  Version: $Id: dError.c,v 1.9 2001-08-27 14:46:55 Singular Exp $
10 *******************************************************************/
11#ifndef DERROR_C
12#define DERROR_C
13#include <stdarg.h>
14#include <stdio.h>
15#include "mod2.h"
16#include "distrib.h"
17#ifdef p_Procs_Static
18#include "version.h"
19#endif
20#ifdef HAVE_CONFIG_H
21#include "omalloc.h"
22#endif
23#ifdef MAKE_DISTRIBUTION
24#include "version.h"
25#endif
26
27#ifdef __cplusplus
28extern "C" 
29{
30#endif
31
32int dReportError(const char* fmt, ...)
33{
34  va_list ap;
35  va_start(ap, fmt);
36#ifndef MAKE_DISTRIBUTION
37  fprintf(stderr, "\n// ***dError: ");
38  vfprintf(stderr, fmt, ap);
39#if 0
40    if !defined(OM_NDEBUG) && defined(HAVE_CONFIG_H)
41#endif
42#if  defined(HAVE_CONFIG_H)
43  fprintf(stderr, " occured at: \n");
44  omPrintCurrentBackTraceMax(stderr, 8);
45#endif
46  dErrorBreak();
47#else
48  fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
49  fprintf(stderr, "// !!! Please, email the following output to singular@mathematik.uni-kl.de");
50  fprintf(stderr, "// !!! Singular Version: " S_UNAME S_VERSION1 " (%lu)\n",
51          feVersionId);
52  vfprintf(stderr, fmt, ap);
53#endif
54  return 0;
55}
56
57
58#ifndef MAKE_DISTRIBUTION
59// dummy procedure for setting a breakpoint
60// within the debugger
61void dErrorBreak()
62{}
63#endif
64
65#ifdef __cplusplus
66}
67#endif
68
69#endif
70 
71
72
73 
74 
75 
Note: See TracBrowser for help on using the repository browser.