Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use Debug instead of Console.Error
updated to use Debug
  • Loading branch information
sefgit committed Dec 29, 2023
commit a57b8de4e0fb30166eee292941a8f427a530cd66
8 changes: 4 additions & 4 deletions src/runtime/AssemblyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ internal static Type[] GetTypes(Assembly a)
// Return all types that were successfully loaded
foreach (var item in exc.LoaderExceptions)
{
System.Console.Error.WriteLine("[pythonnet] {0}", item.Message);
Debug.WriteLine("[pythonnet] {0}", item.Message);
}
return exc.Types.Where(x => x != null && IsExported(x)).ToArray();
}
Expand All @@ -429,7 +429,7 @@ internal static Type[] GetTypes(Assembly a)
}
catch (FileNotFoundException)
{
System.Console.Error.WriteLine("[pythonnet] {0} File not found", a.GetName());
Debug.WriteLine("[pythonnet] {0} File not found", a.GetName());
return new Type[0];
}
catch (System.TypeLoadException e)
Expand All @@ -442,15 +442,15 @@ internal static Type[] GetTypes(Assembly a)
{
foreach (var item in exc.LoaderExceptions)
{
System.Console.Error.WriteLine("[pythonnet] {0}", item.Message);
Debug.WriteLine("[pythonnet] {0}", item.Message);
}
// Return all types that were successfully loaded
return exc.Types.Where(x => x != null && IsExported(x)).ToArray();
}
}
catch (Exception e) // System.TypeLoadException
{
System.Console.Error.WriteLine("[pythonnet] {0} {1}", a.GetName(), e);
Debug.WriteLine("[pythonnet] {0} {1}", a.GetName(), e);
return new Type[0];
}

Expand Down