dd77e4628f
`Client.execute` in Java interface is now strongly typed: returned TDLib object type depends on the return type defined in the corresponding Function class. When TDLib error is occurred, method now throws `Client.ExecutionError`. This change adds compile-time protection against return type change and allows using this pattern: ``` try { TdApi.SpecificReturnType result = Client.execute(function); // work with strongly typed resultl without casting and type checks } catch (Client.ExecutionError error) { // Handle error } ``` |
||
---|---|---|
.. | ||
example | ||
Client.java |