REF OBJECTCLASS_MISHAP_CODES                     Steve Knight   May 1993

        COPYRIGHT University of Sussex 1993. All Rights Reserved.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<                                  >>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<   MISHAP CODES FOR OBJECTCLASS   >>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<                                  >>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Overview
--------

Some mishap messages start with a string of characters representing a
code for the error.  This file contains a summary of these codes for
errors produced by the OBJECTCLASS system.  For general error codes see
HELP *MISHAP_CODES.



Error Codes for Objectclass
---------------------------


ocai                                                        [error_code]
APPLY_INSTANCE NOT DEFINED FOR THIS ITEM
        When applying an object, the generic procedure -apply_instance-
        gets called.  By default, -apply_instance- raises this mishap.


occe                                                        [error_code]
INCONSISTENT ARGUMENTS
        When updating the class_example it is necessary that the
        key of the value is the same as the key supplied.  Furthermore,
        the second argument must be a key.  If either of these
        conditions isn't met then this message is issued.


oceta                                                       [error_code]
METHOD PART HAS EXCESS TYPED ARGUMENTS (incorrect with_nargs?)
        This mishap message is typically produced when a method-
        part has its arity set using with_nargs.  However, the
        method-part may demand a greater number of arguments by
        virtue of having more typed arguments than the arity
        allows.  For example,

            define foo( x:A, y:B ) with_nargs 1; ... enddefine;

        would generate this error message because this method-part
        will always pop two values from the stack to perform the
        method-dispatch.


ocgpd                                                       [error_code]
GENERIC PROCEDURE ALREADY DECLARED IN ANOTHER FILE
        A generic procedure, declared using the define:generic
        syntax, automatically checks to see whether it has been
        previously defined and, if so, in which file.  Should the
        current file and the previous file not be the same, then
        a warning is issued as this is an error (although not
        necessarily a serious one.)


ocgpn                                                       [error_code]
GENERIC PROCEDURE WAS DEFINED AS NON-METHOD
        The generic procedure definition has assigned to a variable
        that held an unexpected value -- indicative of an error.
        The previous value is expected to either be a generic
        procedure or an undef record.  Any other value provokes
        this warning.


ocicd                                                       [error_code]
CLASS DEFINITION IS INCOMPLETE
        The end of the file has been found before the current
        class definition is closed.



ocie                                                        [error_code]
OBJECTCLASS INTERNAL ERROR
        You should never see this error message.  An internal
        consistency check has failed due to an error in the
        ObjectClass package.  Please report this error as soon
        as possible with as much detail as can be supplied.


ocif                                                        [error_code]
OBJECTCLASS INTERNAL FAULT
        You should never see this error message.  An internal
        consistency check has failed due to an error in the
        ObjectClass package.  Please report this error as soon
        as possible with as much detail as can be supplied.

        [This error message is slightly more informative than
        "ocie" and is designed to identify specific problems.]


ocimp                                                       [error_code]
ADDING INVALID METHOD PART TO METHOD PROCEDURE
        This mishap message is produced when programmatically
        assigning method-parts into method procedures.  The method
        part must be a slot or a procedure otherwise this error
        is generated.


ocipca                                                      [error_code]
INVALID PARENT FOR CLASS ADOPTION
        This mishap message is caused by incorrectly attempting to add a
        superclass to another class.  The problem is that the candidate
        parent requires a slot in the candidate child class that is not
        already present.  This is not allowed.


oclcon                                                      [error_code]
LCONSTANT CLASSES NOT YET SUPPORTED
        For technical reasons, concerned with the irregularity of
        the POPLOG VM instructions, it is not possible to declare
        objectclasses with lconstant as the default declaration.
        This will be fixed at some future date.


ocmpa                                                       [error_code]
ARITY OF METHOD PARTS DO NOT AGREE
        This mishap message is produced when you are trying to
        define a method which requires a number of arguments that
        is different from other definitions of the same method.
        For example,

            define :method foo( x, y ); ... enddefine;
            define :method foo( x );    ... enddefine;

        will generate this mishap because they are inconsistent
        about the arity that the method-procedure ``foo'' should
        have.  It is a deliberate restriction that all method-parts
        of a method-procedure should have the same arity.

        You can force a method to have a particular arity by using
        the -with_nargs- specifier.  See HELP *WITH_NARGS.


ocmwp                                                       [error_code]
APPLYING METHOD WITHOUT PARTS
        A method which has no definitions (because it has been
        cancelled, for example) has been applied.


ocnu                                                        [error_code]
NO UPDATER FOR METHOD
        A method which has no updater has been applied


ocnw                                                        [error_code]
FOUND NO METHOD TO WRAP
        An attempt to add a wrapper to a method failed because
        the method could not be found.  This is because the generic
        procedure has no method with a strictly identical set of
        classes.


ocscn                                                       [error_code]
SUPER-CLASS NAME NOT A WORD
        An ``is'' (or ``isa'') clause of a class-definition contains a
        reference to a non-word instead of a class name.


ocsn                                                        [error_code]
INVALID NAME FOR SLOT
        A slot (or shared_slot) in define:class was given as a non-word,
        such as a number or a string.


--- C.all/lib/objectclass/ref/objectclass_mishap_codes
--- Copyright University of Sussex 1993. All rights reserved.
