mirror of
https://github.com/Garmelon/PFERD.git
synced 2025-09-15 08:22:32 +02:00
Improve transformer error handling
This commit is contained in:
@@ -7,6 +7,7 @@ from .cli import PARSER, load_default_section
|
||||
from .config import Config, ConfigDumpError, ConfigLoadError, ConfigOptionError
|
||||
from .logging import log
|
||||
from .pferd import Pferd
|
||||
from .transformer import RuleParseError
|
||||
from .version import NAME, VERSION
|
||||
|
||||
|
||||
@@ -122,6 +123,10 @@ def main() -> None:
|
||||
log.unlock()
|
||||
log.error(str(e))
|
||||
exit(1)
|
||||
except RuleParseError as e:
|
||||
log.unlock()
|
||||
e.pretty_print()
|
||||
exit(1)
|
||||
except KeyboardInterrupt:
|
||||
log.unlock()
|
||||
log.explain_topic("Interrupted, exiting immediately")
|
||||
|
Reference in New Issue
Block a user