Unverified Commit eacc0dda authored by Jonah Brüchert's avatar Jonah Brüchert
Browse files

Crash more user friendly

parent f920362b
......@@ -9,6 +9,7 @@ Base module for the lab package
# SPDX-License-Identifier: GPL-2.0-or-later
import argparse
import traceback
from typing import List, Any
......@@ -25,6 +26,8 @@ from lab import (
workflow,
)
from lab.utils import Utils, LogType
class Parser: # pylint: disable=R0903
"""
......@@ -70,7 +73,20 @@ def main() -> None:
Entry point
"""
parser: Parser = Parser()
parser.parse()
try:
parser.parse()
except: # noqa: E722
print()
Utils.log(LogType.Error, "git-lab crashed. This should not happen.")
print(
"Please help us to fix it by opening an issue on",
"https://invent.kde.org/sdk/git-lab/-/issues.",
"Make sure to include the information below:",
"\n```\n",
traceback.format_exc(),
"```",
)
if __name__ == "__main__":
......
[MESSAGES CONTROL]
disable=bad-continuation,too-few-public-methods
disable=bad-continuation,too-few-public-methods,bare-except # already handled by flake8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment