获取不到存储空间百分比的时候返回空不报错
This commit is contained in:
parent
12cd3be1f7
commit
f3ea8ebb0d
@ -532,7 +532,8 @@ public class StorageSourceConvertImpl implements StorageSourceConvert {
|
|||||||
return df.format(remainingPercentage) + "%";
|
return df.format(remainingPercentage) + "%";
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalArgumentException("无法获取磁盘空间: " + e.getMessage());
|
return null;
|
||||||
|
//throw new IllegalArgumentException("无法获取磁盘空间: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//计算空间生育大小
|
//计算空间生育大小
|
||||||
@ -566,7 +567,8 @@ public class StorageSourceConvertImpl implements StorageSourceConvert {
|
|||||||
return formatted + "GB";
|
return formatted + "GB";
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new IllegalArgumentException("无法获取磁盘空间: " + e.getMessage());
|
return null;
|
||||||
|
//throw new IllegalArgumentException("无法获取磁盘空间: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user