home *** CD-ROM | disk | FTP | other *** search
/ PC User 2001 August / APC_Aug2001_CD2.iso / features / j2sdk / files / linux / j2sdklin.bin / jdk1.3.1 / include-old / exceptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-06  |  1.6 KB  |  74 lines

  1. /*
  2.  * @(#)exceptions.h    1.16 00/02/02
  3.  *
  4.  * Copyright 1994-2000 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the proprietary information of Sun Microsystems, Inc.  
  7.  * Use is subject to license terms.
  8.  * 
  9.  */
  10.  
  11. /*
  12.  * The Java runtime exception handling mechanism.
  13.  */
  14.  
  15. #ifndef _JAVASOFT_EXCEPTIONS_H_
  16. #define _JAVASOFT_EXCEPTIONS_H_
  17.  
  18. /*
  19.  * Header files.
  20.  */
  21.  
  22. #include "oobj.h"
  23. #include "threads.h"
  24.  
  25. /*
  26.  * Type definitions.
  27.  */
  28.  
  29. /*
  30.  * Exceptions, as defined in the Java93 spec, are subclasses of Object.
  31.  *
  32.  * The list of exceptions thrown by the runtime and other commonly
  33.  * used classes can be found in StandardDefs.gt.
  34.  */
  35. typedef JHandle *exception_t;
  36.  
  37. /*
  38.  * The exception mechanism has a set of preallocated exception objects
  39.  * that can be thrown in the face of utter confusion and system meltdown.
  40.  * internal_exception_t enumerates these objects.
  41.  */
  42. typedef enum {
  43.     IEXC_NONE,                    /* A null object */
  44.     IEXC_NoClassDefinitionFound,
  45.     IEXC_OutOfMemory,
  46.     IEXC_END                    /* Keep this last */
  47. } internal_exception_t;
  48.  
  49.  
  50. /*
  51.  * External routines.
  52.  */
  53.  
  54. /*
  55.  * exceptionInit() -- Initialize the exception subsystem.
  56.  */
  57. extern void exceptionInit(void);
  58.  
  59. /*
  60.  * exceptionInternalObject() -- Return an internal, preallocated
  61.  *    exception object.  These are shared by all threads, so they
  62.  *    should only be used in a last ditch effort.
  63.  */
  64. extern JHandle *exceptionInternalObject(internal_exception_t exc);
  65.  
  66. /*
  67.  * exceptionDescribe() -- Print out a description of a given exception
  68.  *     object.
  69.  */
  70. extern void exceptionDescribe(struct execenv *ee);
  71.  
  72. #endif /* !_JAVASOFT_EXCEPTIONS_H_ */
  73.  
  74.