Page 2 of 2

Re: Create a new exception type for unsupported operations?

Posted: 19.11.2019, 08:50
by Fr0sT
Well, "if SupportsPing then..." is indeed looks pretty nicer than "try Ping except on E: EZUnsupOp do ... end". In any case the ability of ping (pingability!) is determined manually in the code so there's no much difference in support. Moreover, base Ping could be widened to "if not SupportsPing then raise EZUnsupOp" so the old behavior won't change. I've no strong position here

Re: Create a new exception type for unsupported operations?

Posted: 20.11.2019, 00:07
by aehimself
Fr0sT wrote:In any case the ability of ping (pingability!) is determined manually in the code so there's no much difference in support.
That's where you are right, and wrong. Let me explain: after implementing the .Ping functionality now you'll have to manually change a False to True, so the library will correctly report that it supports it now. Since the base class raises an exception if the descendant has no override, this was fully automatic until now. This can be solved with RTL, but I have doubts D7 supports it.
I know it's not much, but it's extra administration. And having served 13 years in a multinational company I'll do everything to avoid that :D

(for those LUCKY people who has no experience, multinational companies simply love extra administration, there were years when I had to register my vacation in 3 different tools!!!)

Re: Create a new exception type for unsupported operations?

Posted: 22.11.2019, 10:16
by marsupilami
Just to finalize this: I am not against having that EZNotSupportedException. And I will gladly accept any patches that don't extend the IZDatabaseInfo interface. If I think, I need this urgently, I still could do it myself - Zeos is open Source after all ;)

Re: Create a new exception type for unsupported operations?

Posted: 25.11.2019, 23:12
by aehimself
Took long enough, I upgraded to 10.3.3 and changed by component layout completely (now using only DCUs, not rebuilding them every time). And of course our kid started to have really bad colic, so my night were not exactly spent with coding :)

I just posted a pull request with my recommended change.

Re: Create a new exception type for unsupported operations?

Posted: 26.11.2019, 09:31
by marsupilami
aehimself wrote: 25.11.2019, 23:12 I just posted a pull request with my recommended change.
And it just got applied ;) Don't worry - we all have a life outside of Zeos ;)