Results 1 to 3 of 3
  1. #1

    node.js | lightstreamer-client-node module not throwing errors in callbacks

    I'm not sure if this is a LS issue, but after many tries and searches, I decided to post about my issue here.
    I use node.js and lightstreamer-client-node module.
    If I create a subscription :
    mySubscription = new ls.Subscription(...);
    and then I add listeners, for example :
    onSubscription: function() {

    I have noticed that node won't trigger any errors, and the callback will silently stop executing (without returning).
    For example, with this code, with this unexistentFunction. Also, is the functions exists but inside the functions there are errors, the same will occur.
    Any way to recover the normal behavior, triggering exception errors ?

    Thank you in advance


  2. #2

    Callback errors are internally caught and aren’t propagated up the calling stack, since the Lightstreamer library must be able to work even in presence of user-side anomalies. Further, callbacks are called asynchronously and so eventual errors wouldn’t pop up where the callbacks are registered.
    Therefore the only way to capture your own errors is to surround your functions with a try-catch.

  3. #3
    Grazie Alessandro, thanks for your answer, it's really welcome...



Similar Threads

  1. .NET Client throwing "Session not found" error
    By vpurohit in forum Client SDKs
    Replies: 10
    Last Post: January 23rd, 2017, 10:50 AM
  2. Replies: 3
    Last Post: May 9th, 2014, 08:56 AM
  3. Internal cause codes & Session callbacks
    By jonasby1 in forum General
    Replies: 4
    Last Post: February 16th, 2012, 09:47 AM
  4. Replies: 1
    Last Post: October 21st, 2009, 11:19 AM
  5. web client is not updating , no errors in server console
    By kishorekkk in forum Adapter SDKs
    Replies: 1
    Last Post: April 10th, 2009, 09:33 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 09:44 AM.