home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 3 / goldfish_volume_3.bin / files / gfx / 3d / irit / trim_lib / trim_ftl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-09-23  |  1.7 KB  |  34 lines

  1. /******************************************************************************
  2. * Trim_ftl.c - default FatalError function for the trim library.          *
  3. *******************************************************************************
  4. * Written by Gershon Elber, October 94.                          *
  5. ******************************************************************************/
  6.  
  7. #include <stdio.h>
  8. #include "trim_loc.h"
  9.  
  10. /*****************************************************************************
  11. * DESCRIPTION:                                                               M
  12. * Trap Trim_lib errors right here. Provides a default error handler for the  M
  13. * trim library. Gets an error description using TrimDescribeError, prints it M
  14. * and exit the program using exit.                                           M
  15. *                                                                            *
  16. * PARAMETERS:                                                                M
  17. *   ErrID:      Error type that was raised.                                  M
  18. *                                                                            *
  19. * RETURN VALUE:                                                              M
  20. *   void                                                                     M
  21. *                                                                            *
  22. * KEYWORDS:                                                                  M
  23. *   TrimFatalError, error handling                                           M
  24. *****************************************************************************/
  25. void TrimFatalError(TrimFatalErrorType ErrID)
  26. {
  27.     char
  28.     *ErrorMsg = TrimDescribeError(ErrID);
  29.  
  30.     fprintf(stderr, "TRIM_LIB: %s\n", ErrorMsg);
  31.  
  32.     exit(-1);
  33. }
  34.