DoesNotUnderstandError:
Filter:
Classes | Core

DoesNotUnderstandError : MethodError : Error : Exception : Object

Error thrown when calling an unknown method name
Source: Error.sc

Description

This error is typically generated when a method that doesn't exist on the receiver is called. Users typically do not construct this object themselves. The object has a few getters to learn more about the call that caused the error.

This method reports a backtrace as well as a best-guess suggested replacement based on edit distance.

Class Methods

DoesNotUnderstandError.new(receiver, selector, args)

Construct a new DoesNotUnderstandError, and choose a possible suggested replacement based on the class of the receiver and contents of the selector.

Arguments:

receiver

The object on which the method was called.

selector

The method name that was not understood.

args

Arguments passed to the unknown method.

Inherited class methods

Instance Methods

.selector

.selector = value

Returns:

The selector passed to new. Typically, the method name that was not understood.

.args

.args = value

Returns:

The args passed to new. Typically, an array of arguments passed to the unknown method.

.suggestedCorrection

Returns:

If there is a method that the receiver would understand that looks similar to the unknown method name, the the Method object that corresponds to it. Otherwise, nil.

.errorString

Returns:

Short-form representation of the error as a String, with a suggested replacement if one was found.

.reportError

Print a long-form explanation of the error including backtrace and suggested replacement if one was found.

Inherited instance methods

Undocumented instance methods

.adviceLinkPage