Skip to content

Commit

Permalink
return run and cleanup both errors on create failed (youki-dev#2998)
Browse files Browse the repository at this point in the history
* fix(libcontainer): combine multi error when create container failed

When container creation fails and triggers a cleanup process that also
fails, the original creation error is overwritten by the cleanup error.
This change ensures that both the primary creation error and the
subsequent cleanup error are captured and reported, providing better
visibility into the failure sequence.

Signed-off-by: xujihui1985 <[email protected]>

* fix: fix lint error

Signed-off-by: xujihui1985 <[email protected]>

* refactor(libcontainer): add CreateContainerError

add CreateContainerError to encapsulate both create error and cleanup
error, so that caller will understand what happened

Signed-off-by: xujihui1985 <[email protected]>

* refactor(libcontainer): use tuple instead of struct

change createContainerError to tuple instead of struct

Signed-off-by: xujihui1985 <[email protected]>

---------

Signed-off-by: xujihui1985 <[email protected]>
  • Loading branch information
xujihui1985 authored and github-actions[bot] committed Dec 6, 2024
1 parent 0587948 commit d213b43
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit d213b43

Please sign in to comment.