I usually test for pre and postconditions like this:
procedure TBlobDB.CreateNewDatabase(aDBStream, aIndexStream: TStream;
aTakeStreamOwnership: boolean);
const
Procname = 'TBlobDB.CreateNewDatabase';
begin
if not Assigned(aDBStream) then
raise EParameterCannotBeNil.Create(Procname,'aDBStream');
if not Assigned(aIndexStream) then
raise EParameterCannotBeNil.Create(Procname,'aIndexStream');
This is for errors that are supposed to be found and fixed during the testing phase or (for library code) in unit tests. For user input the input is validated before it is used by the program, if this is at all feasable. The end user should never see an exception coming from parameter validation at a lower level, in my opinion, since the UI context may not be evident at that point and it may be unclear to the user what he did wrong.