Skip to content

Commit 8b4850b

Browse files
Merge pull request #1045 from hqhq/recursive_generic_error
Allow recrusive generic error
2 parents b1e602e + b2e8111 commit 8b4850b

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

libcontainer/generic_error.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ func newSystemErrorWithCause(err error, cause string) Error {
6767
// stack frames skipped. This is only to be called by the other functions for
6868
// formatting the error.
6969
func createSystemError(err error, cause string) Error {
70-
if le, ok := err.(Error); ok {
71-
return le
72-
}
7370
gerr := &genericError{
7471
Timestamp: time.Now(),
7572
Err: err,

libcontainer/process_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ loop:
356356
}
357357
}
358358
if !sentRun {
359-
return newSystemErrorWithCause(ierr, "container init failed")
359+
return newSystemErrorWithCause(ierr, "container init")
360360
}
361361
if p.config.Config.Namespaces.Contains(configs.NEWNS) && !sentResume {
362362
return newSystemError(fmt.Errorf("could not synchronise after executing prestart hooks with container process"))

0 commit comments

Comments
 (0)