[fpc-pascal] Standard exceptions

Marco van de Voort marcov at stack.nl
Tue Mar 1 14:07:23 CET 2011

In our previous episode, Jonas Maebe said:
> None of these exist in Pascal. You can get exceptions for range check errors (ERangeError) in case you enable range checking and include the sysutils unit in your uses clause, but in that case range checking will be performed for all assignments, not just for passed arguments (and the range is checked by the compiler at the caller side based on the declared parameter types, not at the callee side). There are only a few routines in the RTL that explicitly raise it after explicitly checking their arguments.
> There are no generic equivalents to ArgumentException and
> ArgumentNullException (when asking such questions in the future, you may
> also want to include a reference to a web page that describes what they
> mean, it makes it easier for people to answer you).

C# has nullable types, and my guess would be that the ArgumentNullexception
happens you assign/pass a nullable value with NULL to a non-nullable

So it could be that it corresponds to some EVariantisnull error, but that is
a bit of a stretch.

More information about the fpc-pascal mailing list