perf : 异常处理替换为YOO的异常类

This commit is contained in:
何冠峰
2025-12-05 15:45:04 +08:00
parent 5da8c6baf8
commit e5d0a856a5
27 changed files with 243 additions and 74 deletions
@@ -22,7 +22,7 @@ namespace YooAsset
add
{
if (IsValidWithWarning == false)
throw new System.Exception($"{nameof(SubAssetsHandle)} is invalid");
throw new YooHandleException($"{nameof(SubAssetsHandle)} is invalid. It may have been released or the provider was destroyed.");
if (Provider.IsDone)
value.Invoke(this);
else
@@ -31,7 +31,7 @@ namespace YooAsset
remove
{
if (IsValidWithWarning == false)
throw new System.Exception($"{nameof(SubAssetsHandle)} is invalid");
throw new YooHandleException($"{nameof(SubAssetsHandle)} is invalid. It may have been released or the provider was destroyed.");
_callback -= value;
}
}