error logger headaches
This commit is contained in:
30
src/amsmathutil25/util/amsmathutil25_errorlogger.cpp
Normal file
30
src/amsmathutil25/util/amsmathutil25_errorlogger.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
#include <amsmathutil25/amsmathutil25.hpp>
|
||||
|
||||
namespace ams
|
||||
{
|
||||
|
||||
void amsmathutil25_default_errlogger(
|
||||
const char *msg,
|
||||
int code,
|
||||
void *)
|
||||
{
|
||||
fprintf(stderr,"%s, %d\n",msg,code);
|
||||
return;
|
||||
}
|
||||
|
||||
amsmathutil25_errloggerptr_t amsmathutil25_get_errlogger()
|
||||
{
|
||||
if(amsmathutil25_errlogger==NULL)
|
||||
{
|
||||
amsmathutil25_errlogger = amsmathutil25_default_errlogger;
|
||||
}
|
||||
return amsmathutil25_errlogger;
|
||||
}
|
||||
|
||||
void amsmathutil25_set_errlogger(void(*errloggerpointer)(const char *, int, void *),void *errglobal)
|
||||
{
|
||||
amsmathutil25_errglobal = errglobal;
|
||||
amsmathutil25_errlogger = errloggerpointer;
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user