[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error Handling in MCL 2.0b1p3

I need to catch errors that occur in functions I call instead of dropping
into the listener. For example, if within a function I call the following
expression appears:

        (string= 1 "2")

the program is suspended, control is passed to the break loop, and the
following error appears in the listener:

    > Error: Argument 1 is not of type STRING.
    > While executing: STRING=
    > Type Command-. to abort.
    See the RestartsI menu item for further choices.
    1 > 

Instead, I would like my functin to handle the error.

The purpose of handling these errors is to allow a program that tests
student functions to recover gracefully in case of student errors.

  John E. Bell         jbell@garnet.berkeley.edu
  Instructional Technology Program
  UC Berkeley