[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Error System

  All classes in Class(y) v2.4 ultimately inherit from the Object class
  (defined in CSYOBJEC.PRG). If no superclass is specified when creating a
  class, Object is used automatically.

  The Object class defines some methods which are absolutely essential to
  the correct functioning of the object system. Among these are the error
  handling methods.

  When a Class(y) error occurs, a message is sent to the object which caused
  the error. For example, if the code obj:cloze is executed, and the
  message cloze is not found in the class of obj, then a
  msgNotFound() message will be sent to obj.

  A default msgNotFound method is defined in the Object class. In most
  cases, this method will be executed, and the standard Clipper error system
  will be invoked with the appropriate message.

  However, in some cases it may be desirable in a particular class to handle
  errors in some way other than the default. Merely overriding the error-
  handling method concerned will achieve this.

  For example, the Symbol class has been implemented using this feature. The
  msgNotFound method was overriden, so that the Symbol class will
  understand _any_ message sent to it, and respond by returning a symbol
  object.

  This feature could also be used to create classes which ignore invalid
  messages, rather than generating an error.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson