Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Recommended Posts

Posted

Good morning,

I would like to ask: does error in execution of quickapp launches an event (I suspect it does)? If so maybe someone know basic parameter(s) of this event - anything which can help with catching it?

  • Topic Author
  • Posted

    No one answers, so I search for answer myself. Error throws an event. Here's raw content of example:

    Please login or register to see this code.

    • Like 1
  • Topic Author
  • Posted

    I checked what happened if scene fails. Also event is generated in such case, but this is the same event generated at successful end of a scene("SceneFinishedEvent"). So it's not useful for scene "error handling".

     

    But catching events for QA errors is useful - especially dynamic, run-time, like typo in function call, invoked after meeting rare condition. What is interesting division by zero is not an error in LUA (returns inf).

     

    Have you ever wondered why on earth that long-running QA has for some time now, failed to do thing it was created for? The error message long ago has been lost in the flood of other console messages... This can be avoided by handling the case using a ready-made event library (probably eventlib or eventrunner can do this), or by writing a custom QA error handler - perhaps with push message support.

     

  • Topic Author
  • Posted

    One tiny update: the event is generated when a QA crashes, except in one case - when the code is executed within the scope of setTimeout (and setInterval, I assume). The error appears in the console, but no event is triggered. I suspect this is somehow related to the asynchronous nature of these functions.

    Posted

    You can trace and monitor any error in the system by scanning debug console information.

  • Topic Author
  • Posted (edited)

    To be honest, I don't know how to access information from the console. If you're suggesting this, I assume it's possible.

    However, my goal is to react to real situations (errors), not to scan messages again and again, which could be CPU-intensive.

    So I'd rather avoid doing it that way.

     

    Possibly, after future firmware update, also errors in async blocks of code will be "evented". If error-info can be printed on the console, I hope it can generate event as well.

    Edited by Łukasz997

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...