Hi,
it's me again! 
I'm trying to catch ExecErrors when running my pipeline (which builds and runs a bunch of dotnet things), and export a "snapshot" of the current state of the container filesystem at time of error for debugging purposes. But for some reason, I can't get it to work.
I've read https://github.com/dagger/dagger/issues/4706#issuecomment-1571677488, https://github.com/dagger/dagger/pull/5184 and everything related, but I might be doing something wrong
try:
await test_pipeline.exit_code()
except dagger.ExecError as e:
await test_pipeline.directory("/src/temp/").export(
f"test/test_runs/foobar"
)
# you can choose what to do with the error
# (e.g., abort, log, ignore...)
# e.message
# e.exit_code
# e.stdout
# e.stderr
# e.cmd
...
I can catch the error, but the export is not working. Is this even possible? Please let me know if you need further information, sadly I cannot simply copy-paste the output because of corporate stuff in there.
Thanks in advance!
Fixes #4700
This adds a custom ExecError that allows you to access properties of an command execution error directly, without having to parse them using regex or similar, from the error message.
Th...