boxesserver: Improve error handling during rendering
Especially don't print messages for out of bound parameters into the log/stdout
This commit is contained in:
parent
fe9555a79f
commit
4a711b1cb4
|
@ -497,10 +497,11 @@ class BServer:
|
||||||
box.render()
|
box.render()
|
||||||
box.close()
|
box.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
if not isinstance(e, ValueError):
|
||||||
|
traceback.print_exc()
|
||||||
start_response("500 Internal Server Error",
|
start_response("500 Internal Server Error",
|
||||||
[('Content-type', 'text/plain; charset=utf-8')])
|
headers)
|
||||||
return([b"Server Error\n\n", str(e).encode("utf-8")])
|
return self.errorMessage(name, e, _)
|
||||||
|
|
||||||
http_headers = box.formats.http_headers.get(
|
http_headers = box.formats.http_headers.get(
|
||||||
box.format,
|
box.format,
|
||||||
|
|
Loading…
Reference in New Issue