mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-04 08:11:43 -08:00
rename print_error to report, use it with together with package name
This commit is contained in:
parent
d67ef01f62
commit
05933840f0
24 changed files with 69 additions and 90 deletions
|
|
@ -14,9 +14,8 @@ from fastapi.encoders import jsonable_encoder
|
|||
from secrets import compare_digest
|
||||
|
||||
import modules.shared as shared
|
||||
from modules import sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing
|
||||
from modules import sd_samplers, deepbooru, sd_hijack, images, scripts, ui, postprocessing, errors
|
||||
from modules.api import models
|
||||
from modules.errors import print_error
|
||||
from modules.shared import opts
|
||||
from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img, process_images
|
||||
from modules.textual_inversion.textual_inversion import create_embedding, train_embedding
|
||||
|
|
@ -145,7 +144,7 @@ def api_middleware(app: FastAPI):
|
|||
print(message)
|
||||
console.print_exception(show_locals=True, max_frames=2, extra_lines=1, suppress=[anyio, starlette], word_wrap=False, width=min([console.width, 200]))
|
||||
else:
|
||||
print_error(message, exc_info=True)
|
||||
errors.report(message, exc_info=True)
|
||||
return JSONResponse(status_code=vars(e).get('status_code', 500), content=jsonable_encoder(err))
|
||||
|
||||
@app.middleware("http")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue