When an assertion without a message fails, it raises a generic EAssertionFailed
exception, which is of little use when debugging. Providing a message ensures that the assertion
is more immediately identifiable and helpful when it fails.
Add a descriptive message string as the second parameter to the System.Assert call:
procedure Foo(Bar: TObject); begin Assert(Assigned(Bar)); end;
procedure Foo(Bar: TObject); begin Assert(Assigned(Bar), 'Bar must be initialized'); end;