Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Class(y) - <b>error reporting</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
    Error Reporting
------------------------------------------------------------------------------

    A function called METHODNAME() has been provided.  It is similar in
    behaviour to, and can be used instead of, PROCNAME().  It is intended
    to provide more informative error traces.  The following old-style
    error trace was obtained with MENUDEMO.EXE:

        Called from: obj:EXEC(71)
        Called from: obj:EXEC(73)
        Called from: obj:EXEC(53)
        Called from: obj:EXEC(72)
        Called from: obj:EXEC(73)
        Called from: obj:EXEC(53)
        Called from: obj:EXEC(72)
        Called from: MAIN(49)

    By using METHODNAME() in ERRORSYS, you can get the following more
    informative listing:

        Called from: POPUPMENU(_):EXEC(71)
        Called from: POPUPMENU:EXEC(73)
        Called from: MENUITEM:EXEC(53)
        Called from: PULLDNMENU/POPUPMENU(_):EXEC(72)
        Called from: PULLDNMENU/POPUPMENU:EXEC(73)
        Called from: MENUITEM:EXEC(53)
        Called from: MENUBAR/BASEMENU:EXEC(72)
        Called from: MAIN(49)

    A file called CYERRSYS.OBJ is provided with Class(y) to implement this.
    It is a recompiled version of a very slightly modified ERRORSYS.PRG.
    It can be linked in along with the other object files an application,
    automatically resulting in the enhanced error trace.

    If you have your own modified version of ERRORSYS, all you need to do
    is change one line to obtain the enhanced error trace.  In the original
    ERRORSYS, there is a line similar to the following (usually line 131):

        ? "Called from", Trim(ProcName(i)) + ;

    Merely change the PROCNAME(i) call to METHODNAME(i), as follows:

        ? "Called from", Trim(MethodName(i)) + ;

    Recompile the module.  Link this module with your system to obtain the
    enhanced error trace. The general format of the string returned by
    METHODNAME() is as follows:

        <receiver's class>[/<impl class>][(_)]:<message>[(*)]

    <receiver's class> is the class of the object receiving the message

    <impl class> is the class in which the method is implemented.  This
    will be omitted if it is the same as the receiver's class.  When
    present, it will always be an ancestor class of the receiver.

    (.) an up-arrow is included if the method concerned is actually
    implemented in a class higher up the inheritance tree than the one
    displayed.  This can occur when the super message, or an explicit class
    name message, is used to override the normal behaviour of a message
    search.

    (*) an asterisk appears after the message name if that message could
    not be found in the class method dictionary.  This means one of two
    things:

    .   The message name was not the same as the method name, ie. it was
        declared using the MESSAGE...METHOD command, or its obsolete
        equivalent, METHOD...=.

    .   The message does not exist.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson