Hi guys,
Working with some standarization of our code base we added a code that on creation of a ROremoteDataModule service checks if there is a SessionManager and/or EventRepository assigned to it.
The SessionManager property works well when is checked via
if Self.SessionManager=nil
or
if Assigned(Self.SessionManager)
But when working with the EventRepository, if there is no EventRepository assigned, any of the two options above will create an exception error.
It can be captured, but it creates some kind of “smelly code”, specially if you are checking for these assignments while creating your service, plus it doesnt aligned with the behaviour of the other properties.
Thank you once again.
Delphi Berlin, Latest RO/DA.