better image config parse error.

compatible oci runtime version printed with parse error

Signed-off-by: Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
This commit is contained in:
Kunal Kushwaha 2018-03-05 14:04:08 +09:00
parent e6a3dd3550
commit 6ed4e9e106

View File

@ -97,7 +97,7 @@ func loadSpec(path string, s *specs.Spec) error {
return errors.New("cannot load spec config file")
}
if err := json.Unmarshal(raw, s); err != nil {
return errors.New("decoding spec config file failed")
return errors.Errorf("decoding spec config file failed, current supported OCI runtime-spec : v%s", specs.Version)
}
return nil
}