improve more errors during startup

errors from a module a combined with a header and intended
details

Change-Id: I4be7bc2f8455fb0e3c9346f3bb23ac88e7589604
This commit is contained in:
2021-04-27 15:56:19 +02:00
parent de7a91d727
commit 57e9367e40
2 changed files with 28 additions and 27 deletions

View File

@ -245,12 +245,8 @@ class Server:
continue
cls = get_class(classname)
except Exception as e:
if pymodule is None:
if str(e) == 'no such class':
errors.append('%s not found' % classname)
else:
raise
errors.append(repr(e))
if str(e) == 'no such class':
errors.append('%s not found' % classname)
else:
failed.add(pymodule)
failure_traceback = traceback.format_exc()
@ -262,9 +258,13 @@ class Server:
if opts:
errors.append(self.unknown_options(cls, opts))
self.modules[modname] = modobj
except Exception as e:
except ConfigError as e:
errors.append('error creating module %s:' % modname)
for errtxt in e.args[0]:
errors.append(' ' + errtxt)
except Exception:
failure_traceback = traceback.format_exc()
errors.append('error creating %s: %r' % (modname, e))
errors.append('error creating %s' % modname)
poll_table = dict()
# all objs created, now start them up and interconnect