Commit d17c8a74 authored by rswindell's avatar rswindell
Browse files

Error messages logged with errormsg() now contain the name of the C/C++

function where the error is being reported from. So the WHERE macro now
contains the __FUNCTION__ "macro" and the various js*.c files that use the
WHERE macro to report errors had to be updated too.
This fixes the SCFG build errors related to "errormsg"
parent 59a41092
/* scfg.c */
/* Synchronet configuration utility */
/* $Id$ */
......@@ -8,7 +6,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -1883,12 +1881,13 @@ void bail(int code)
/* information, function, action, object and access and then attempts to */
/* write the error information into the file ERROR.LOG in the text dir. */
/****************************************************************************/
void errormsg(int line, char* source, char* action, char* object, ulong access)
void errormsg(int line, char* function, char* source, char* action, char* object, ulong access)
{
char scrn_buf[MAX_BFLN];
gettext(1,1,80,uifc.scrn_len,scrn_buf);
clrscr();
printf("ERROR - line: %d\n",line);
printf(" function: %s\n",function);
printf(" file: %s\n",source);
printf(" action: %s\n",action);
printf(" object: %s\n",object);
......
/* scfg.h */
/* $Id$ */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -76,7 +74,7 @@ extern BOOL new_install;
/***********************/
void bail(int code);
void errormsg(int line, char *source, char* action, char *object, ulong access);
void errormsg(int line, char* function, char *source, char* action, char *object, ulong access);
void clearptrs(int subnum);
int save_changes(int mode);
void node_menu(void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment