check err type

Signed-off-by: zteBill <bi.zhenkun@zte.com.cn>
This commit is contained in:
zteBill 2016-11-22 16:44:46 +08:00
parent 5afdacb20e
commit 47b110a592

View file

@ -255,6 +255,9 @@ func (s *VolumeStore) CreateWithRef(name, driverName, ref string, opts, labels m
v, err := s.create(name, driverName, opts, labels)
if err != nil {
if _, ok := err.(*OpErr); ok {
return nil, err
}
return nil, &OpErr{Err: err, Name: name, Op: "create"}
}