Create a new exception type for unsupported operations?
Re: Create a new exception type for unsupported operations?
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?
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.Fr0sT wrote:In any case the ability of ping (pingability!) is determined manually in the code so there's no much difference in support.
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
(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!!!)
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Create a new exception type for unsupported operations?
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?
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.
I just posted a pull request with my recommended change.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17