source: git/Singular/dError.c @ 764e0c

spielwiese
Last change on this file since 764e0c was 764e0c, checked in by Olaf Bachmann <obachman@…>, 23 years ago
* small bug fixes git-svn-id: file:///usr/local/Singular/svn/trunk@4697 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.5 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.5 2000-11-06 15:20:37 obachman 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 HAVE_CONFIG_H
18#include "omalloc.h"
19#endif
20
21#ifdef __cplusplus
22extern "C" 
23{
24#endif
25
26extern unsigned long feVersionId;
27
28int dReportError(const char* fmt, ...)
29{
30  va_list ap;
31  va_start(ap, fmt);
32#ifndef MAKE_DISTRIBUTION
33  fprintf(stderr, "\n// ***dErrror: ");
34  vfprintf(stderr, fmt, ap);
35  fprintf(stderr, " occured at: \n");
36#ifdef HAVE_CONFIG_H
37  omPrintCurrentBackTraceMax(stderr, 8);
38#endif
39  dErrorBreak();
40#else
41  fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
42  fprintf(stderr, "// !!! Please, email the following output to singular@mathematik.uni-kl.de");
43  fprintf(stderr, "// !!! Singular Version: " S_UNAME S_VERSION1 " (%lu)\n",
44          feVersionId);
45  vfprintf(stderr, fmt, ap);
46#endif
47  return 0;
48}
49
50
51#ifndef MAKE_DISTRIBUTION
52// dummy procedure for setting a breakpoint
53// within the debugger
54void dErrorBreak()
55{}
56#endif
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif
63 
64
65
66 
67 
68 
Note: See TracBrowser for help on using the repository browser.