is there any way to get custom messages to web client?
for example i want send a message when user is not authenticated... if there is some error occured in updating... etc...
is there any way to catch such exceptions in the side of web client?
Printable View
is there any way to get custom messages to web client?
for example i want send a message when user is not authenticated... if there is some error occured in updating... etc...
is there any way to catch such exceptions in the side of web client?
i just nw see... there are number of event handlers like onServerError, onClientError..... hope these will help;)
I can use onServer event for handling certain set of errors that are generated in the server.
But is there any way to send any custom errors from the server?
All client requests are validated towards the Metadata Adapter and, for several API methods, the Metadata Adapter can refuse a request by issuing a "CreditsException", where a custom error code and messages can be specified.
Such code and message are propagated to the client application code (but for the "sendMessage" case, which is not handled by the Web Client Library).
No custom error codes are available for syntax errors in request details or erros during elaboration of request validation.
On the other hand, if you mean asynchronous error communications to be inserted into the normal data flow, then the answer is no.
All asynchronous actions in Lightstreamer are related to the data flow and can only be initiated, on the server side, by the Data Adapter issuing an "update" or similar call.
Of course, a special-purpose item can be introduced at application level, so that a client can subscribe to it to get asynchronous error communications.
Note: some asynchronous actions can be triggered through the JMX interface (for Vivace edition only), but none is useful for this purpose.