Previous: , Up: Methods and Generic Functions   [Contents][Index]


8.6.6 Handling Invocation Errors

If a generic function is invoked with a combination of parameters for which there is no applicable method, GOOPS raises an error.

generic: no-method
method: no-method (gf <generic>) args

When an application invokes a generic function, and no methods at all have been defined for that generic function, GOOPS calls the no-method generic function. The default method calls goops-error with an appropriate message.

generic: no-applicable-method
method: no-applicable-method (gf <generic>) args

When an application applies a generic function to a set of arguments, and no methods have been defined for those argument types, GOOPS calls the no-applicable-method generic function. The default method calls goops-error with an appropriate message.

generic: no-next-method
method: no-next-method (gf <generic>) args

When a generic function method calls (next-method) to invoke the next less specialized method for that generic function, and no less specialized methods have been defined for the current generic function arguments, GOOPS calls the no-next-method generic function. The default method calls goops-error with an appropriate message.