mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-24 02:50:26 -08:00
Add & use modules.errors.print_error where currently printing exception info by hand
This commit is contained in:
parent
b957dcfece
commit
00dfe27f59
25 changed files with 117 additions and 153 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import os
|
||||
import sys
|
||||
import traceback
|
||||
import importlib.util
|
||||
|
||||
from modules.errors import print_error
|
||||
|
||||
|
||||
def load_module(path):
|
||||
module_spec = importlib.util.spec_from_file_location(os.path.basename(path), path)
|
||||
|
|
@ -27,5 +27,4 @@ def preload_extensions(extensions_dir, parser):
|
|||
module.preload(parser)
|
||||
|
||||
except Exception:
|
||||
print(f"Error running preload() for {preload_script}", file=sys.stderr)
|
||||
print(traceback.format_exc(), file=sys.stderr)
|
||||
print_error(f"Error running preload() for {preload_script}", exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue