From 46b7c30e013c15fc254a17e5151f05c99da6def4 Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Fri, 30 Aug 2024 15:55:15 +0800
Subject: [PATCH] runc:format log instead panic when procError missing payload

---
 libcontainer/sync.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libcontainer/sync.go b/libcontainer/sync.go
index 25dc286..e6029fd 100644
--- a/libcontainer/sync.go
+++ b/libcontainer/sync.go
@@ -115,7 +115,7 @@ func parseSync(pipe io.Reader, fn func(*syncT) error) error {
 				return ierr
 			}
 			// Programmer error.
-			panic("No error following JSON procError payload.")
+			return errors.New("procError missing error payload")
 		}
 
 		if err := fn(&sync); err != nil {
-- 
2.33.0

