Commit 5ed7daa3 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #14120 from AUTOMATIC1111/protect-against-bad-ui-creation-scripts

catch uncaught exception with ui creation scripts
parents ef1723ef 8a6e4bda
......@@ -570,6 +570,7 @@ class ScriptRunner:
if controls is None:
return
try:
script.name = wrap_call(script.title, script.filename, "title", default=script.filename).lower()
api_args = []
......@@ -605,6 +606,9 @@ class ScriptRunner:
self.inputs += controls
script.args_to = len(self.inputs)
except Exception:
errors.report(f"Error creating UI for {script.name}: ", exc_info=True)
def setup_ui_for_section(self, section, scriptlist=None):
if scriptlist is None:
scriptlist = self.alwayson_scripts
......
Markdown is supported
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