Many functions work fine when no exceptions occur. But when exceptions occur the functions do not handle them properly and often cause other side effects. In other cases they functions handle the exception, but not in the way that they were designed to. With the tinder box technique, exceptions are purposefully introduced into your functions. Essentially the goal is to intentionally and purposefully blow the functions up.
Examples Let s walk through examples for various box types using a sample function.
Delphi has a built in function in SysUtils called StringReplace. We are going to use a modified form of the function called StringThing. StringThing assumes the string may contain Multibyte characters. If the Flags parameter includes rfIgnoreCase, The string comparison operation is case insensitive. OldPattern must not be a null string, if so, EEmptyString exception will be raised.