ice icon indicating copy to clipboard operation
ice copied to clipboard

Simplify user exception mapping

Open bernardnormier opened this issue 7 months ago • 2 comments

User exceptions are more like result failures (see https://docs.icerpc.dev/slice2/language-guide/result-types) than actual exceptions.

As a result, a mapped user-exception does not need:

  • the ability to set a custom error message during construction
  • the ability to set an inner exception

Furthermore, a client-side application does not need to ever create a user exception. So we don't need to provide/document a constructor/initializer for mapped user exceptions in client-only mappings (MATLAB, PHP, Ruby).

Fixed in:

  • [x] C++
  • [x] C#
  • [ ] Java
  • [x] JavaScript
  • [x] MATLAB
  • [x] PHP
  • [ ] Python
  • [x] Ruby
  • [x] Swift

bernardnormier avatar Jul 18 '24 19:07 bernardnormier