mirror of
https://github.com/wassname/ray.git
synced 2026-07-20 12:40:20 +08:00
Improve error message printing and suppression. (#2104)
This commit is contained in:
committed by
Philipp Moritz
parent
f37e2e5d2f
commit
99ae74e1d2
+4
-4
@@ -38,10 +38,10 @@ def format_error_message(exception_message, task_exception=False):
|
||||
"""
|
||||
lines = exception_message.split("\n")
|
||||
if task_exception:
|
||||
# For errors that occur inside of tasks, remove lines 1, 2, 3, and 4,
|
||||
# which are always the same, they just contain information about the
|
||||
# main loop.
|
||||
lines = lines[0:1] + lines[5:]
|
||||
# For errors that occur inside of tasks, remove lines 1 and 2 which are
|
||||
# always the same, they just contain information about the worker code.
|
||||
lines = lines[0:1] + lines[3:]
|
||||
pass
|
||||
return "\n".join(lines)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user