zeroc-ice / ice

All-in-one solution for creating networked applications with RPC, pub/sub, server deployment, and more.
https://zeroc.com
GNU General Public License v2.0
2.01k stars 592 forks source link

Add comment describing who can throw these exceptions #2419

Open pepone opened 2 weeks ago

pepone commented 2 weeks ago
          It would be nice to add a comment describing who can throw these exceptions.

The NotExist exceptions and Unknown exceptions:

All the other exceptions: only the IcePy C++ extension code?

Maybe users who implement a ValueFactoryManager are expected to throw AlreadyRegisteredException as well from their Python code? (seems undesirable - it's better if we can avoid having users throw local exceptions)

_Originally posted by @bernardnormier in https://github.com/zeroc-ice/ice/pull/2417#discussion_r1667030816_

bernardnormier commented 2 weeks ago

I believe the following local exceptions can be thrown by application code:

client-only mappings based on C++ (MATLAB, Ruby, PHP)

None. That's because these language mappings don't allow the application to register their own ValueFactoryManager.

C++, C#, Java, JavaScript

Swift and Python

Swift's InitializationData doesn't allow you to install a ValueFactoryManager. Python's InitializationData does but it's not used (i.e., it's a bug).