Improve error logging
This commit is contained in:
parent
b350e9c45b
commit
f85c37fea6
3
pew.go
3
pew.go
@ -162,18 +162,21 @@ func whatever(swg *sizedwaitgroup.SizedWaitGroup, ka config.Artifact,
|
|||||||
kernel := qemu.Kernel{KernelPath: ki.KernelPath, InitrdPath: ki.InitrdPath}
|
kernel := qemu.Kernel{KernelPath: ki.KernelPath, InitrdPath: ki.InitrdPath}
|
||||||
q, err := qemu.NewQemuSystem(qemu.X86_64, kernel, ki.RootFS)
|
q, err := qemu.NewQemuSystem(qemu.X86_64, kernel, ki.RootFS)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Println("Qemu creation error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
q.Timeout = qemuTimeout
|
q.Timeout = qemuTimeout
|
||||||
|
|
||||||
err = q.Start()
|
err = q.Start()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Println("Qemu start error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer q.Stop()
|
defer q.Stop()
|
||||||
|
|
||||||
tmp, err := ioutil.TempDir("/tmp/", "out-of-tree_")
|
tmp, err := ioutil.TempDir("/tmp/", "out-of-tree_")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Println("Temporary directory creation error:", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer os.RemoveAll(tmp)
|
defer os.RemoveAll(tmp)
|
||||||
|
Loading…
Reference in New Issue
Block a user