1
0
Fork 0
mirror of synced 2024-06-28 11:11:15 +12:00
Rare/rare
loathingKernel 9d4e0995fd
RareAppException: Create exception handler that can show a dialog
The reason is that `sys.excepthook` is a global attribute which we
have to unset for threads because we show a Qt dialog in it and we
can't do that from threads. Before this change, we used to unset
it in threads, but since it is a global attr, that was unsetting it
for the whole application. We cannot reliably reset it because we
can have multiple threads executing and there will be race conditions.

To fix this situation, `RareAppException` implements a callback to
be patched into `sys.excepthook` which emits a signal to be serviced
by the the `RareAppException` instance in the main thread.
`RareAppException` can be subclassed to implement the
`RareAppException._handler` method for domain specific handling.

The `RareApp` base class instantiates its own `RareAppException`
instance for early basic handling. `RareAppException` is subclassed
into `RareException` and `RareLauncherExcpetion` in `Rare` and `RareLauncher`
respectively to implement the aforemention domain specific handling.
Each of these classes deletes the previous instance and replace it
with their specialized handlers.
2023-03-07 17:11:21 +02:00
..
components Misc: rename get_size to format_size 2023-03-06 00:39:23 +02:00
game_launch_helper RareAppException: Create exception handler that can show a dialog 2023-03-07 17:11:21 +02:00
lgndr InstallDialog: Allow downloading 0 size DLCs 2023-02-17 10:37:44 +02:00
models RareGame: Origin games should be able to launch despite not being installed 2023-03-07 17:11:20 +02:00
resources StaticStylesheet: Share common properties by setting common object names 2023-03-03 16:51:26 +02:00
shared RareAppException: Create exception handler that can show a dialog 2023-03-07 17:11:21 +02:00
ui Resources: Move some more stylesheets into the static CSS 2023-03-03 14:16:04 +02:00
utils WaitingSpinner: center contents 2023-03-06 00:39:23 +02:00
widgets RareAppException: Create exception handler that can show a dialog 2023-03-07 17:11:21 +02:00
__init__.py Bump version 2023-01-22 21:14:18 +01:00
__main__.py GameWidget: Implement reactive and interactive labels 2023-02-07 13:41:59 +02:00
app.py RareAppException: Create exception handler that can show a dialog 2023-03-07 17:11:21 +02:00