mirror of
https://github.com/Garmelon/PFERD.git
synced 2023-12-21 10:23:01 +01: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