GRASS Programmer's Manual  6.4.2(2012)
g3derror.c
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <sys/types.h>
00004 #include <unistd.h>
00005 #include <time.h>
00006 #include <stdarg.h>
00007 #include <rpc/types.h>
00008 #include <rpc/xdr.h>
00009 #include <grass/gis.h>
00010 
00011 #include "G3d_intern.h"
00012 
00013 /*---------------------------------------------------------------------------*/
00014 
00015 
00025 void G3d_skipError(const char *msg)
00026 {
00027 }
00028 
00029 
00040 void G3d_printError(const char *msg)
00041 {
00042     fprintf(stderr, "ERROR: ");
00043     fprintf(stderr, msg);
00044     fprintf(stderr, "\n");
00045 }
00046 
00047 
00058 void G3d_fatalError(const char *msg, ...)
00059 {
00060     char buffer[2000];          /* No novels to the error logs, OK? */
00061     va_list ap;
00062 
00063     va_start(ap, msg);
00064     vsprintf(buffer, msg, ap);
00065     va_end(ap);
00066 
00067     G_fatal_error("%s", buffer);
00068 }
00069 
00070 void G3d_fatalError_noargs(const char *msg)
00071 {
00072     G_fatal_error("%s", msg);
00073 }
00074 
00075 void G3d_error(const char *msg, ...)
00076 {
00077     char buffer[2000];          /* No novels to the error logs, OK? */
00078     va_list ap;
00079 
00080     va_start(ap, msg);
00081     vsprintf(buffer, msg, ap);
00082     va_end(ap);
00083 
00084     (*g3d_error_fun) (buffer);
00085 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines