home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / somperr.idl < prev    next >
Text File  |  1999-02-22  |  14KB  |  326 lines

  1. //
  2. //   COMPONENT_NAME: somp
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1996,1996  
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) 2.14 src/somp/somperr.idl, somp, som2.1 12/26/95 17:01:34 [7/30/96 14:47:04]
  14.  
  15.  
  16. /*
  17.  *
  18.  * Change Activity:
  19.  *
  20.  *   04/19/93  rsturgis  Added code for attempt to add duplicate object to group.
  21.  *
  22.  */
  23.  
  24. #ifndef SOMPERR_IDL
  25. #define SOMPERR_IDL
  26.  
  27. exception sompException {
  28.   long primary;                      /* See below for primary error values */
  29.   long secondary;  /* primary=1, see errno.h,  primary=2, see below...     */
  30.   
  31. };
  32.  
  33. const long SOMPERROR_SYSTEM_ERROR    = 1;
  34. /* Errors reported by the system. See errno.h for secondary value */
  35.  
  36. const long SOMPERROR_FRAMEWORK_ERROR = 2;
  37. /* Framework specific error. See below for secondary value */
  38.  
  39.    const long SR_BASE = 10;  /* Base for secondary error values */
  40.  
  41.    const long SOMPERROR_OBJ_ALREADY_REGISTERED  = SR_BASE + 0;
  42. /* -----------------------------------------------------------
  43.    Attempt to register an object that was already registered.
  44.    This is an internal error and should not be user visible.
  45. */
  46.    const long SOMPERROR_COULD_NOT_FIND_DIR      = SR_BASE + 1;
  47. /* -----------------------------------------------------------
  48.    The system ID assigner attempted to use the path specified in
  49.    the environment variable SOMP_PERSIST to find the file containing
  50.    the last assigned ID, and the path did not exist.  Check the value
  51.    of SOMP_PERSIST and make sure it points to a valid pathname.
  52. */
  53.    const long SOMPERROR_IOGROUP_EMPTY           = SR_BASE + 2;
  54. /* -----------------------------------------------------------
  55.    One of the IO Group Managers was asked to write an empty IOGroup.
  56.    This is an internal error and should not be user visible.
  57. */
  58.    const long SOMPERROR_COULD_NOT_RESTORE_OBJ   = SR_BASE + 3;
  59. /* -----------------------------------------------------------
  60.    A request was made to restore an object.  The ID indicated
  61.    a valid file, but the requested object was not in the file.
  62. */
  63.    const long SOMPERROR_OBJ_IS_NOT_PERSISTENT   = SR_BASE + 4;
  64. /* -----------------------------------------------------------
  65.    Attempted to store an object that is not derived from PersistentObject.
  66.    Only objects derived from PersistentObject can be stored.
  67. */
  68.    const long SOMPERROR_IOGROUP_NEWOBJ          = SR_BASE + 5;
  69. /* -----------------------------------------------------------
  70.    Attempted to restore object, but the appropriate class object
  71.    could not be found. Users with SOMPERROR_IOGROUP_NEWOBJ errors
  72.    should put their object in a dynamically loadable file or use
  73.    their "<className>NewClass" function to create their class object
  74.    before attempt to restore objects.
  75.  
  76.    If the objects are already in a DLL, ensure that:
  77.    - The SOMInitModule function for the DLL executes the
  78.      <className>NewClass function for the class which can not
  79.      be restored.
  80.    - On OS/2, ensure that the SOMInitModule entry point uses
  81.      the "system" linkage convention. (see samples)
  82.    - The class definiation in question has the "dllname" modifier.
  83.      For example, if your dll was named foo.dll you should have
  84.      dllname="foo.dll"; in your .idl file.
  85.    - That you have updated the interface repository for your class.
  86.      Assuming foo.idl, you can run "sc -sir -u foo.idl" to update
  87.      the IR.
  88.    - Ensure environment variable SOMIR points to the correct IR
  89.      file.
  90.  
  91.    When all else fails, explicitly call the <className>NewClass
  92.    function of your class before attempting to restore it.
  93.  
  94. */
  95.    const long SOMPERROR_IOGROUP_NOTREAD         = SR_BASE + 6;
  96. /* -----------------------------------------------------------
  97.    Attempted to read an object whose I/O Group has never been
  98.    read.  This is an internal error, and should not be user
  99.    visible.
  100. */
  101.    const long SOMPERROR_OBJ_IS_NOT_INITIALIZED  = SR_BASE + 7;
  102. /* ----------------------------------------------------------
  103.    Attempted to store an object which was not properly initialized.
  104.    Code needs to initialize a persistent object with a PersistentID
  105.    before saving.
  106.  
  107.    Ensure that you have done one of :
  108.    - sompInitGivenId
  109.    - sompInitNextAvail
  110.    - sompInitNearObject
  111.    on the persistent object.
  112.  
  113. */
  114.    const long SOMPERROR_PFW_INIT_FAILED         = SR_BASE + 8;
  115. /* -----------------------------------------------------------
  116.    Failure to instantiate either the PersistentStorageMgr or
  117.    the NameSpaceMgr.  This is an internal error, and should not
  118.    be user visible.
  119. */
  120.    const long SOMPERROR_ED_INVALID_DATA_TYPE    = SR_BASE + 9;
  121. /* -----------------------------------------------------------
  122.    Default Encoder/Decoder attempted to read in some data, but
  123.    could not recognize the data type.  This could indicate a
  124.    corrupted data file or an internal error.
  125. */
  126.    const long SOMPERROR_BAD_OBJECT_ID_STRING    = SR_BASE + 10;
  127. /* ------------------------------------------------------------
  128.    You have attempted to initialize a persistent ID with a
  129.    string that is not of the appropriate syntax.
  130.  
  131.    The correct form of a persistent ID is:
  132.  
  133.      <IOGroupMgrClassName>:<IOGroupName>:<GroupKey>
  134.  
  135.     where:
  136.  
  137.       <IOGroupMgrClassName> is the class name of an IO Group Manager
  138.       class. The framework supplies two: SOMPAscii and SOMPBinary
  139.  
  140.       <IOGroupName> is a name understandable to the IOGroupMgrClass.
  141.       SOMPAscii and SOMPBinary expect this name to be a file name.
  142.  
  143.       <GroupKey> is a key number
  144.  
  145.    If this error occurs during restore, either the ID you have
  146.    passed to the Persistent Storage Mgr is incorrect, or possibly
  147.    the ID of an object embedded in the object you are attempting
  148.    to restore is incorrect. The string ID read from storage may
  149.    have been corrupted on disk.
  150. */
  151.    const long SOMPERROR_INVALID_OBJECT_TYPE     = SR_BASE + 11;
  152. /* ------------------------------------------------------------
  153.    One of the media interfaces attempted to determine the type
  154.    of an object and couldn't.  This could indicate a corrupted
  155.    data file or an internal error.
  156. */
  157.    const long SOMPERROR_ENC_DEC_NOT_FOUND       = SR_BASE + 12;
  158. /* ------------------------------------------------------------
  159.    The class object of the encoder/decoder you are attempting to
  160.    use can not be found.  To determine what class the framework
  161.    is attempting to find you can invoke the method
  162.  
  163.       sompGetEncoderDecoderName
  164.  
  165.    on the objects of the class you are attempting to save/restore.
  166.  
  167.    This error is typically the result of specifying a user written
  168.    encoder/decoder class (via either sompSetEncoderDecoderName
  169.    or sompSetClassLevelEncoderDecoderName) without first ensuring
  170.    that its class object exists. Execute either the "NewClass"
  171.    function of the encoder/decoder class or ensure that it is
  172.    installed correctly in a DLL. (see SOMPERROR_IOGROUP_NEWOBJ)
  173.  
  174.    If the the encoder/decoder class name is SOMPAttrEncodeDecoder,
  175.    then there is a problem with the framework.
  176.  
  177. */
  178.    const long SOMPERROR_IOGROUP_DOES_NOT_EXIST  = SR_BASE + 13;
  179. /* ------------------------------------------------------------
  180.    PersistentStorageMgr was trying to read or delete an object, but couldn't
  181.    find the IOGroup. For SOMPAscii and SOMPBinary, this means that
  182.    the file could not be found.
  183.  
  184.    This error is the result of sompGroupExists method returning FALSE.
  185.  
  186. */
  187.    const long SOMPERROR_OBJECT_NOT_FOUND        = SR_BASE + 14;
  188. /* ------------------------------------------------------------
  189.    The object could not be restored or deleted because it could
  190.    not be found.
  191.  
  192.    Ensure that the SOMP_PERSIST environment variable is set
  193.    the same as when you stored the object.
  194.  
  195.    If the file appears to be there but you still can't restore,
  196.    perhaps the upper/lower case difference in the name of the file.
  197.    The framework is case sensitive.
  198. */
  199.    const long SOMPERROR_INTERFACE_NOT_FOUND     = SR_BASE + 15;
  200. /* ------------------------------------------------------------
  201.    One of the IOGroupManagers was attempting to copy a group
  202.    and could not find the appropriate MediaInterface.  This is an
  203.    internal error and should not be user visible.
  204. */
  205.    const long SOMPERROR_NOT_STORING_OBJECTS     = SR_BASE + 16;
  206. /* ------------------------------------------------------------
  207.    sompAddObjectToWriteSet has been called but since the
  208.    PersistentStorageMgr is not currently storing objects there
  209.    is no write set.
  210.  
  211.    The sompAddObjectToWriteSet method is intended to be used
  212.    by encoder/decoder objects which are run during a save/restore.
  213. */
  214.    const long SOMPERROR_POINTER_NOT_REGISTERED  = SR_BASE + 17;
  215. /* ------------------------------------------------------------
  216.    Undocumented method was invoked.  This is an internal error,
  217.    and should not be user visible.
  218. */
  219.    const long SOMPERROR_MEDIA_FORMAT_ERROR      = SR_BASE + 18;
  220. /* ------------------------------------------------------------
  221.    Attempt was made to read a file with a particular IOGroupMgr,
  222.    but the file was incompatible with the requested IOGroupMgr.
  223.    Make sure the IOGroupMgr specified in the PersistentID is
  224.    compatible with the IOGroupMgr that wrote the file.
  225.  
  226.    This error may also occur if you attempt to restore an object
  227.    from a file produced by an aborted store. If the store attempt
  228.    failed, the file may have been left in an invalid format.
  229.  
  230. */
  231.    const long SOMPERROR_BAD_IOGROUP_MANAGER     = SR_BASE + 19;
  232. /* ------------------------------------------------------------
  233.    Attempted to restore an object with a nonexistent IOGroupMgr.
  234.    Check the name of the IOGroupMgr in the Persistent ID.
  235.  
  236.    The IOGroupMgr class name is the first part of a peristent ID.
  237.    The class object of the IOGroupMgr must exist prior to invoking
  238.    store/restore requests to it. Ensure that you have either called
  239.    the <className>NewClass procedure of your IOGroupMgr class or
  240.    have properly installed your class into a dynamically loadable
  241.    library. (see SOMPERROR_IOGROUP_NEWOBJ)
  242. */
  243.    const long SOMPERROR_NOT_RESTORING_OBJECTS   = SR_BASE + 20;
  244. /* ---------------------------------------------------------
  245.    sompAddIdToReadSet has been called but since the
  246.    PersistentStorageMgr is not currently restoring objects there
  247.    is no read set.
  248.  
  249.    The sompAddIdToReadSet method is intended to be used by encoder/decoder
  250.    objects which are run during a save/restore.
  251. */
  252.    const long SOMPERROR_ED_AGGREGATE_TYPE_CHG   = SR_BASE + 21;
  253. /* ------------------------------------------------------------
  254.    An object has been redefined in a way that one of its aggregate
  255.    data types is no longer compatible with its stored data.
  256.    Typically this means that either
  257.    - A new member has been added to a structure.
  258.    - A sequence's type has been changed, i.e. what had been a sequence
  259.      of reals is now a sequence of strings.
  260.    - An array's type has been changed, i.e. what had been an array
  261.      of reals is now an array of strings.
  262. */
  263.    const long SOMPERROR_ED_ATTR_NOT_DEFINED     = SR_BASE + 22;
  264. /* ------------------------------------------------------------
  265.    An object has been redefined such that one of its attributes
  266.    is no longer valid.
  267.  
  268.    During the restore of an object, data for an nonexistent attribute
  269.    was found. The restore has been aborted.
  270. */
  271.    const long SOMPERROR_ED_TC_RESTORE_FAILED    = SR_BASE + 23;
  272. /* ------------------------------------------------------------
  273.    An attempt to read a type code failed.  This could indicate
  274.    corrupted data file or an internal error.
  275. */
  276.    const long SOMPERROR_ED_TYPECHG              = SR_BASE + 24;
  277. /* ------------------------------------------------------------
  278.    The definition for an attribute has changed its type.
  279.  
  280.    During the restore of an object, the data type of an attribute
  281.    has been found to be different than stored data type.
  282.    The restore has been aborted.
  283. */
  284.    const long SOMPERROR_ED_TYPE_SIZE_CHG        = SR_BASE + 25;
  285. /* ------------------------------------------------------------
  286.    The definition for a sequence has changed such that the amount
  287.    of data stored in the sequence exceeds the new maximum.
  288. */
  289.    const long SOMPERROR_ED_UNSUPPORTED_TYPE     = SR_BASE + 26;
  290. /* ------------------------------------------------------------
  291.    Attempted to store a non supported type code.  The type of the
  292.    data was not a recognized CORBA data type.
  293. */
  294.    const long SOMPERROR_ED_CLASS_NOT_DEFINED    = SR_BASE + 27;
  295. /* ------------------------------------------------------------
  296.    An attempt was made to read an object that is not registered
  297.    in the inteface repository.
  298. */
  299.    const long SOMPERROR_DUPLICATE_OBJECT_ID     = SR_BASE + 28;
  300. /* ------------------------------------------------------------
  301.    Attempted to initialize an object with the same ID as another
  302.    object already initialized.
  303. */
  304.    const long SOMPERROR_SOMDISPATCH_FAILED      = SR_BASE + 29;
  305. /* ------------------------------------------------------------
  306.    In the process of storing or restoring an object, the dispatch
  307.    of the _get or _set method of an attribute failed. This is
  308.    usually a problem with the SOMInitModule.
  309. */
  310.  
  311.    const long SOMPERROR_TEST_ERROR              = SR_BASE+99; /* for testing purposes */
  312.    const long SOMPINFO_END_OF_ATTRIBUTES        = SR_BASE+34; /* defedidl - internal use*/
  313.  
  314. const long SOMPERROR_MAX                     = 4096;
  315. /* -------------------------------------------------------------------------- *
  316.    Error numbers 1 through 4096 are reserved by the framework.
  317.    Error numbers above 4096 are available for use by extensions of the
  318.    framework.
  319.  * -------------------------------------------------------------------------- */
  320.  
  321.  
  322.  
  323. #endif
  324.  
  325.  
  326.