mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
CurrentProcessModules: suppress sporadic errors
This commit is contained in:
parent
0d66c7fd75
commit
d70ae468e8
1 changed files with 10 additions and 2 deletions
|
|
@ -20,10 +20,18 @@ internal static unsafe partial class CurrentProcessModules
|
|||
{
|
||||
t = 0;
|
||||
process = null;
|
||||
Log.Verbose("{what}: Fetchling fresh copy of current process modules.", nameof(CurrentProcessModules));
|
||||
Log.Verbose("{what}: Fetching fresh copy of current process modules.", nameof(CurrentProcessModules));
|
||||
}
|
||||
|
||||
return (process ??= Process.GetCurrentProcess()).Modules;
|
||||
try
|
||||
{
|
||||
return (process ??= Process.GetCurrentProcess()).Modules;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Verbose(e, "{what}: Failed to fetch module list.", nameof(CurrentProcessModules));
|
||||
return new([]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue