Git Product home page Git Product logo

Comments (5)

overfl0 avatar overfl0 commented on July 18, 2024

Original comment by The Sighter (Bitbucket: sighter, GitHub: sighter):


As mentioned in various emails the following applies to errorhandling:

  • If the application main thread raises and uncatched exception, it is fetched and shown via popup, as long _EXC_POPUP = True is set in the settings class
  • if another process raises a exception, which is true if you are inside a para execution, then you have to catch exceptions there and then reject the para. (You can rethrow the exception from the reject handler then or take appropriate actions, to treat the error)

from bulletproof-arma-launcher.

overfl0 avatar overfl0 commented on July 18, 2024

Original comment by The Sighter (Bitbucket: sighter, GitHub: sighter):


Its basically done. I can further improve this by the following.

The para can install the decorator on the function which was passed into it. Then the all exceptions are catched. After that the decorator can re- raise the exception which gets then catched by the default exception handler (popup or console).

Edit
Exception handling via popup can be enabled by setting

self.settings_data.exc_popup = False

to True in the utils.settings.Settings class

Edit: the code above does not apply anymore

from bulletproof-arma-launcher.

overfl0 avatar overfl0 commented on July 18, 2024

Original comment by The Sighter (Bitbucket: sighter, GitHub: sighter):


Asuming there is one parent-process (kivy-main-process) and one child process (syncer) and they are comunicating via an connection object (old messagequeue. Its a connection now, i changed it) then there are 2 basic cases.

  • Child knows, that there was an error. In this case the child has to call the reject(reason) method on the connection object. Reason must be a dictionary with an error msg. Use "msg" as key here.
  • Child just terminates unprepared. The parent process can check if the child is still alive. If not it has to join the dead process
    to kill all connections. Additionally i probably will provide an decorator which can wrap an async function, catches all
    exceptions and reject the para and sends the stacktrace over the connection.

Notes

from bulletproof-arma-launcher.

overfl0 avatar overfl0 commented on July 18, 2024

Original comment by overfl0 (Bitbucket: overfl0, GitHub: overfl0):


Yup :)

from bulletproof-arma-launcher.

overfl0 avatar overfl0 commented on July 18, 2024

Original comment by The Sighter (Bitbucket: sighter, GitHub: sighter):


Thats a good one. U back mate?

from bulletproof-arma-launcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.