Create a new exception type for unsupported operations?

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Fr0sT
Zeos Dev Team
Zeos Dev Team
Posts: 280
Joined: 08.05.2014, 12:08

Re: Create a new exception type for unsupported operations?

Post 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
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Create a new exception type for unsupported operations?

Post 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!!!)
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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Create a new exception type for unsupported operations?

Post 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 ;)
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 797
Joined: 18.11.2018, 17:37
Location: Hungary

Re: Create a new exception type for unsupported operations?

Post 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.
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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Create a new exception type for unsupported operations?

Post 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 ;)
Post Reply