main.py: errmsg fix; workflows: add missing paths

This commit is contained in:
The MMGen Project 2024-01-28 14:03:12 +00:00
commit 46bb919a8d
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 13 additions and 2 deletions

View file

@ -4,7 +4,12 @@ on:
push:
paths:
- '.github/workflows/build.yaml'
- 'pyproject.toml'
- 'setup.cfg'
- 'test/ref/**'
- 'cmds/**'
- '**.py'
- '**.c'
jobs:
test:

View file

@ -4,7 +4,12 @@ on:
push:
paths:
- '.github/workflows/pylint.yaml'
- 'pyproject.toml'
- 'setup.cfg'
- 'test/ref/**'
- 'cmds/**'
- '**.py'
- '**.c'
jobs:
test:

View file

@ -60,13 +60,14 @@ def launch(*, mod=None, func=None, package='mmgen'):
2: _o(yellow, 2, '{message}'),
3: _o(yellow, 3, '\nMMGen Error ({name}):\n{message}'),
4: _o(red, 4, '\nMMGen Fatal Error ({name}):\n{message}'),
'x': _o(yellow, 5, '\nMMGen Unhandled Exception ({name}):\n{message}'),
'x': _o(yellow, 5, '\nMMGen Unhandled Exception ({name}): {e}'),
}[getattr(e,'mmcode','x')]
(sys.stdout if getattr(e,'stdout',None) else sys.stderr).write(
d.color(d.fs.format(
name = type(e).__name__,
message = errmsg ))
message = errmsg,
e = e))
+ '\n' )
sys.exit(d.exit_val)