source: git/Singular/dError.c @ d556962

fieker-DuValspielwiese
Last change on this file since d556962 was d556962, checked in by Hans Schönemann <hannes@…>, 23 years ago
*hannes: p_Proc*static fix git-svn-id: file:///usr/local/Singular/svn/trunk@5295 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.7 2001-03-01 16:14:18 hannes 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#ifdef MAKE_DISTRIBUTION
21#include "version.h"
22#endif
23
24#ifdef __cplusplus
25extern "C" 
26{
27#endif
28
29extern unsigned long feVersionId;
30
31int dReportError(const char* fmt, ...)
32{
33  va_list ap;
34  va_start(ap, fmt);
35#ifndef MAKE_DISTRIBUTION
36  fprintf(stderr, "\n// ***dErrror: ");
37  vfprintf(stderr, fmt, ap);
38#if !defined(OM_NDEBUG) && defined(HAVE_CONFIG_H)
39  fprintf(stderr, " occured at: \n");
40  omPrintCurrentBackTraceMax(stderr, 8);
41#endif
42  dErrorBreak();
43#else
44  fprintf(stderr, "\n// !!! YOU HAVE FOUND A BUG IN SINGULAR.");
45  fprintf(stderr, "// !!! Please, email the following output to singular@mathematik.uni-kl.de");
46  fprintf(stderr, "// !!! Singular Version: " S_UNAME S_VERSION1 " (%lu)\n",
47          feVersionId);
48  vfprintf(stderr, fmt, ap);
49#endif
50  return 0;
51}
52
53
54#ifndef MAKE_DISTRIBUTION
55// dummy procedure for setting a breakpoint
56// within the debugger
57void dErrorBreak()
58{}
59#endif
60
61#ifdef __cplusplus
62}
63#endif
64
65#endif
66 
67
68
69 
70 
71 
Note: See TracBrowser for help on using the repository browser.