// default_error_handling.c - default error handling functions

#include <stdio.h>
#include "default_error_handling.h"

//------------------------------------------------------------
void defaultErrorHandler(int error_type,void *special)
{
  switch(error_type)
  {
  case INTERNAL_ERROR:
    fprintf(stderr,"Error: internal error\n");
    break;
  case OUT_OF_MEMORY:
    fprintf(stderr,"Error: out of memory\n");
    break;
  case ILLEGAL_ARGUMENTS:
    fprintf(stderr,"Error: illegal arguments\n");
    break;
  case ILLEGAL_TYPE:
    fprintf(stderr,"Error: illegal type\n");
    break;
  case ELEMENT_NOT_EXISTING:
    fprintf(stderr,"Error: element not existing\n");
    break;
  case DUPLICATE_KEY:
    fprintf(stderr,"Error: duplicate key\n");
    break;
  default:
    fprintf(stderr,"Error: (unknown type!) %d\n",error_type);
  }
}
