Exceptions encountered during search are logged using Debug.LogException so that stacktrace line numbers are clickable

This commit is contained in:
yasirkula
2021-12-04 17:01:43 +03:00
parent 8c04db9b25
commit 8872a0fcc5
@@ -546,8 +546,8 @@ namespace AssetUsageDetectorNamespace
}
catch( Exception e )
{
StringBuilder sb = new StringBuilder( objectsToSearchSet.Count * 50 + callStack.Count * 50 + 1000 );
sb.AppendLine( "<b>AssetUsageDetector Error:</b>" ).AppendLine().Append( e ).AppendLine();
StringBuilder sb = new StringBuilder( objectsToSearchSet.Count * 50 + callStack.Count * 50 + 500 );
sb.AppendLine( "<b>AssetUsageDetector Error:</b> The following Exception is thrown during the search. Details:" ).AppendLine();
Object latestUnityObjectInCallStack = AppendCallStackToStringBuilder( sb );
@@ -559,6 +559,7 @@ namespace AssetUsageDetectorNamespace
}
Debug.LogError( sb.ToString(), latestUnityObjectInCallStack );
Debug.LogException( e, latestUnityObjectInCallStack );
try
{