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

ppThrow () flaws


I just noticed that ppThrow () has a relatively serious flaw. 

Example code:

obscuretype somefunction (something XY)
	if (correct == false)
		ppThrow (ppEObscureFailure, "It is wrong");
	ResumeNormalWork ();

This works fine as long as ppThrow is evaluated. But if it's not,
ResumeNormalWork () is called even if (correct == false). That's wrong.
"ppThrow (..)" has to be replaced by "return errorindicator" in that case.

Any ideas on how to implement this in an elegant way?


DOSSHELL? Of course DOS is hell.