Since 21.0.13 powerGate provides improved error handling. This allows us to get rid of the OnConnect code and everything related to it. The OnConnect code is complicated and hard to understand. A lot of code is required to use it which also might introduce new errors
Remarks
In order for the ? operator to work as described in the product documentation it must be the first completed command after the erp call. It still works if the ? is called within a function, but it must be the first thing in the function that is executed. Even assigning a variable counts as a command or reading the value from a variable.
Open Questions
In order to test the issue it is necessary to simulate an erp error on the server. Throwing a standard exception does not seem to pass the error to the client.
Description
Since 21.0.13 powerGate provides improved error handling. This allows us to get rid of the OnConnect code and everything related to it. The OnConnect code is complicated and hard to understand. A lot of code is required to use it which also might introduce new errors
Remarks
In order for the ? operator to work as described in the product documentation it must be the first completed command after the erp call. It still works if the ? is called within a function, but it must be the first thing in the function that is executed. Even assigning a variable counts as a command or reading the value from a variable.
Open Questions
In order to test the issue it is necessary to simulate an erp error on the server. Throwing a standard exception does not seem to pass the error to the client.