Comments (5)
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.
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.
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
- see here for getting the stacktrace http://seasonofcode.com/posts/python-multiprocessing-and-exceptions.html
- error popup can be done via http://kivy.org/docs/api-kivy.uix.popup.html
from bulletproof-arma-launcher.
Original comment by overfl0 (Bitbucket: overfl0, GitHub: overfl0):
Yup :)
from bulletproof-arma-launcher.
Original comment by The Sighter (Bitbucket: sighter, GitHub: sighter):
Thats a good one. U back mate?
from bulletproof-arma-launcher.
Related Issues (20)
- Exception while updating the mods
- IOError: [Errno 2] No such file or directory: 'nul' in multiprocessing HOT 3
- Some socket error with TeamSpeak
- Add "Ready" before the "Uploading" HOT 1
- Only show INSTALL button on first install. Use UPDATE later
- Don't show progress indicator when not Updating/Seeding HOT 2
- Hide text "Uploading: 0 connections..." when there's no uploading going on HOT 4
- Show number of leeches instead of connections
- Allow setting optional mods to be downloaded by default
- Add request to start Arma 3 launcher once for new mods
- Add alternate mod names for mods HOT 1
- The status bar says "ready to play" even when an update is needed
- Stacktrace when linking existing mod directory
- Kivy doesn't understand UTF-8 text encoding HOT 4
- Can't download torrent HOT 4
- Window: Unable to find any valuable Window provider. HOT 2
- Creating torrent. HOT 8
- Documentation for Launcher Authentication HOT 1
- Permission for Reusage? HOT 2
- UnicodeDecodeError with ascii in steam_query
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bulletproof-arma-launcher.