@ BrainChemistry
That is exactly the case, hence it is unfortunately no option to check the condition outside the constructor.
OK. I know this is not your fault, however the whole logic seems strange to me. After all set and done, the programmer who calls your class, still has to check if the instance is nil. What is the point? I'm I missing something?
I do not fully understand your confusion about that. The programmer using the unit may accidently use wrong arguments (nil pointer, integers out of bounds, and so on) for my classes, in these cases, my class will react accordingly and testable. What the programmer makes from this, is his own responsibility, I guess.
Although, in the constructor, C functions from external libraries (which I do not maintain) are called , so even if the input is checked to seem perfectly valid, the constructor may lead to a fail. And this is testable now.
https://www.freepascal.org/docs-html/rtl/system/fail.html
If you don't want Delphi compatibility it's ok.
I want Delphi compatibility, and to be honest, on examining your links, I was kind of disappointed. Maybe I will introduce a compiler switch for Delphi later. For now, I will stay with FPC's way of handling it, which seems more convenient to me. Thanks for the hint though!