Revert "Raise exception when a stylesheet is unparsable."
This reverts commit 0400945ac4
.
See #2571
This commit is contained in:
parent
11c026bf4c
commit
111944fb65
@ -61,6 +61,7 @@ Fixed
|
|||||||
- Crash when the key config isn't writable
|
- Crash when the key config isn't writable
|
||||||
- Crash when unbinding an unbound key in the key config
|
- Crash when unbinding an unbound key in the key config
|
||||||
- Crash when using `:debug-log-filter` when `--filter` wasn't given on startup.
|
- Crash when using `:debug-log-filter` when `--filter` wasn't given on startup.
|
||||||
|
- Crash with some invalid setting values
|
||||||
- Various rare crashes
|
- Various rare crashes
|
||||||
|
|
||||||
v0.10.1
|
v0.10.1
|
||||||
|
@ -161,11 +161,6 @@ def stub(suffix=''):
|
|||||||
misc.warning(text)
|
misc.warning(text)
|
||||||
|
|
||||||
|
|
||||||
class CriticalQtWarning(Exception):
|
|
||||||
|
|
||||||
"""Exception raised when there's a critical Qt warning."""
|
|
||||||
|
|
||||||
|
|
||||||
def init_log(args):
|
def init_log(args):
|
||||||
"""Init loggers based on the argparse namespace passed."""
|
"""Init loggers based on the argparse namespace passed."""
|
||||||
level = args.loglevel.upper()
|
level = args.loglevel.upper()
|
||||||
@ -424,17 +419,7 @@ def qt_message_handler(msg_type, context, msg):
|
|||||||
'with: -9805', # flake8: disable=E131
|
'with: -9805', # flake8: disable=E131
|
||||||
]
|
]
|
||||||
|
|
||||||
# Messages which will trigger an exception immediately
|
if any(msg.strip().startswith(pattern) for pattern in suppressed_msgs):
|
||||||
critical_msgs = [
|
|
||||||
'Could not parse stylesheet of object',
|
|
||||||
]
|
|
||||||
|
|
||||||
if any(msg.strip().startswith(pattern) for pattern in critical_msgs):
|
|
||||||
# For some reason, the stack gets lost when raising here...
|
|
||||||
logger = logging.getLogger('misc')
|
|
||||||
logger.error("Got critical Qt warning!", stack_info=True)
|
|
||||||
raise CriticalQtWarning(msg)
|
|
||||||
elif any(msg.strip().startswith(pattern) for pattern in suppressed_msgs):
|
|
||||||
level = logging.DEBUG
|
level = logging.DEBUG
|
||||||
else:
|
else:
|
||||||
level = qt_to_logging[msg_type]
|
level = qt_to_logging[msg_type]
|
||||||
|
Loading…
Reference in New Issue
Block a user