twaddle

Strict mode

In some cases it may not be possible to fulfil all conditions requested within a Twaddle sentence. Consider, for example, the lookup:

<noun-undefined>

If the noun dictionary does not contain a class undefined, this request cannot be fulfilled.

Twaddle generally behaves pragmatically makes a best effort to print something. In the example above, it will choose a random entry from the noun dictionary.

A TwaddleRunner in strict mode does not make a pragmatic attempt to print something, but instead raises an exception (derived from the TwaddleException class) when encountering unfulfillable requirements.

Strict mode exception scenarios

Strict mode raises exceptions in the following scenarios, which would produce no error with strict mode disabled: