perf : 异常处理替换为YOO的异常类
This commit is contained in:
@@ -134,7 +134,7 @@ namespace YooAsset
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Invalid bundle id : {bundleID} Asset path : {packageAsset.AssetPath}");
|
||||
throw new YooManifestException($"Invalid bundle ID : {bundleID}. Valid range is 0 to {BundleList.Count - 1}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,11 +196,13 @@ namespace YooAsset
|
||||
if (bundleID >= 0 && bundleID < BundleList.Count)
|
||||
{
|
||||
var packageBundle = BundleList[bundleID];
|
||||
if (packageBundle == null)
|
||||
throw new YooInternalException();
|
||||
return packageBundle;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception($"Invalid bundle id : {bundleID}");
|
||||
throw new YooManifestException($"Invalid bundle ID : {bundleID}. Valid range is 0 to {BundleList.Count - 1}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user