#include #include #include #include #include #include #include #include #include #include "raster3d_intern.h" /*---------------------------------------------------------------------------*/ /*! * \brief * * This function ignores the error. * * \param * \return void */ void G3d_skipError(const char *msg) { } /*! * \brief * * This function prints the * error message msg to stderr and returns. * * \param * \return void */ void G3d_printError(const char *msg) { fprintf(stderr, "ERROR: "); fprintf(stderr, msg); fprintf(stderr, "\n"); } /*! * \brief * * This function prints the * error message msg, and terminates the program with an error status. * * \param * \return void */ void G3d_fatalError(const char *msg, ...) { char buffer[2000]; /* No novels to the error logs, OK? */ va_list ap; va_start(ap, msg); vsprintf(buffer, msg, ap); va_end(ap); G_fatal_error("%s", buffer); } void G3d_fatalError_noargs(const char *msg) { G_fatal_error("%s", msg); } void G3d_error(const char *msg, ...) { char buffer[2000]; /* No novels to the error logs, OK? */ va_list ap; va_start(ap, msg); vsprintf(buffer, msg, ap); va_end(ap); (*g3d_error_fun) (buffer); }