Dmitry,
As anticipated, we have been working on a plan to improve the lib based on the suggestions we received.
The short-term solution is a new release of the iOS client API, which will be available very soon (hopefully before the holiday season) as part of Lightstreamer 6.0.
For every method that may throw an exception, a corresponding non-exception-throwing version will be provided. This alternative method has the same semantic, parameters and return values, except for an additional
NSError pointer reference that may be used (if not nil) to store a runtime error. For example:
@try {
[client openConnectionWithInfo:connectionInfo delegate:self];
} @catch (NSException *e) {
// Exception handling
}
May be replaced by:
NSError *error= nil;
[client openConnectionWithInfo:connectionInfo delegate:self error:&error];
if (error) {
// Error handling
}
Note that exceptions due to programming errors (such as out-of-bounds access to arrays, etc.) may still be thrown.
The long-term solution was already part of the roadmap. A brand new API will be released on the future, base on the "unified client api" model, which has already been rolled out for JavaScript. The other languages will follow. The unified api is fully asynchronous and throws exceptions only in case of malformed parameters, etc.
Hope that helps.
Thanks,
Alessandro