You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2025. It is now read-only.
Until now we used the built in ChildProcessError exception class for our error reporting. This class essentially has two flaws: first, the attributes it uses (derived from OSError) do not match our intention. Instead of an 'errno' value we have a status code. The error string ('strerror') is the failed process' command line instead, and the 'filename' in our case is the gathered stderr output. Second, and much more importantly, using the 'filename' attribute for transferring the standard error message to the user has a significant drawback: it does not interpret newline characters as line breaks but rather prints the string '\n' instead. This is not only ugly but also unreadable for longer outputs such as Python exception backtraces. This change introduces a new exception class that we use throughout the program: ProcessError. The class provides a string formatting method that properly interprets newline characters, resulting in much nicer backtraces. On the downside, the exception is not built-in and has to be made available explicitly. However, since it is derived from ChildProcessError (as opposed to OSError) it can at the very least be used instead of the latter, which should be specific enough to not catch any unwanted exceptions. import subrepo ./:execute at 5d3a418640120eb0dedad672c1c62cb0f5c33eed import subrepo ./:cleanup at 30129de755f5f7a5b9647b792ca1373b94e15dcb
0 commit comments