| Author |
Post |
|
|
#1 Tue Apr 01, 2008 12:42 pm
|
|
Member
Registered: Sep 2007
Posts: 19
|
Hi Guys, I think that cold be usefull to have LogAssert as funtion and not as a procedure. It should simply return value of condition so i could write if not SiMain.LogAssert(VarInstance <> nil,'ERROR: VarInsanceNil') then Exit;
Regards Ing Giuseppe 'Geppo' Monteleone
|
|
|
#2 Tue Apr 01, 2008 6:26 pm
|
|
Administrator
Registered: Sep 2007
Posts: 134
|
Hello Giuseppe,
I'm not sure if mixing logging and application logic is optimal. For example, what should this function return if logging is disabled?
|
|
|
#3 Wed Apr 02, 2008 3:16 pm
|
|
Member
Registered: Sep 2007
Posts: 19
|
Hi Tobias,
Ok you're right, sometime is better replicate code.... :-) a lot of books says about SRP (single responsability principle)...
logging is a thing, application logic is another thing..... but I didn't think about this :-)
Regards Ing Giuseppe 'Geppo' Monteleone.
|
|
|
#4 Fri Apr 04, 2008 9:14 am
|
|
Administrator
Registered: Sep 2007
Posts: 134
|
Same opinion here 
|