Browse Source

Obsoleted ModsaberModInfo (finally)

Added option to turn off long exception stack traces where the messages tell you most of the info you need
pull/46/head
Anairkoen Schno 5 years ago
parent
commit
f870e652d4
3 changed files with 12 additions and 5 deletions
  1. +1
    -0
      IPA.Loader/Config/SelfConfig.cs
  2. +1
    -0
      IPA.Loader/PluginInterfaces/BeatSaber/ModsaberModInfo.cs
  3. +10
    -5
      IPA.Loader/Updating/BeatMods/Updater.cs

+ 1
- 0
IPA.Loader/Config/SelfConfig.cs View File

@ -51,6 +51,7 @@ namespace IPA.Config
{
public bool ShowCallSource = false;
public bool ShowDebug = false;
public bool ShowHandledErrorStackTraces = false;
public bool HideMessagesForPerformance = true;
public int HideLogThreshold = 512;
}


+ 1
- 0
IPA.Loader/PluginInterfaces/BeatSaber/ModsaberModInfo.cs View File

@ -9,6 +9,7 @@ namespace IPA
/// A class to provide information about a mod on ModSaber.ML
/// </summary>
// ReSharper disable once IdentifierTypo
[Obsolete("This is unused, and has been since the manifest was introduced. All functionality is provided by the manifest.")]
public class ModsaberModInfo
{
/// <summary>


+ 10
- 5
IPA.Loader/Updating/BeatMods/Updater.cs View File

@ -290,7 +290,8 @@ namespace IPA.Updating.BeatMods
catch (Exception e)
{
Logger.updater.Error($"Error getting info for {dep.Name}");
Logger.updater.Error(e);
if (SelfConfig.SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces)
Logger.updater.Error(e);
dep.MetaRequestFailed = true;
continue;
}
@ -356,7 +357,8 @@ namespace IPA.Updating.BeatMods
catch (Exception e)
{
Logger.updater.Error($"Error getting mod list for {dep.Name}");
Logger.updater.Error(e);
if (SelfConfig.SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces)
Logger.updater.Error(e);
dep.MetaRequestFailed = true;
continue;
}
@ -440,7 +442,8 @@ namespace IPA.Updating.BeatMods
catch (Exception e)
{
Logger.updater.Error($"Error occurred while trying to get information for {item}");
Logger.updater.Error(e);
if (SelfConfig.SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces)
Logger.updater.Error(e);
yield break;
}
@ -509,9 +512,11 @@ namespace IPA.Updating.BeatMods
{ // any exception is an intercept exception
Logger.updater.Error($"BeatMods did not return expected data for {item.Name}");
}
else
Logger.updater.Error($"Error downloading mod {item.Name}");
Logger.updater.Error($"Error downloading mod {item.Name}");
Logger.updater.Error(downloadTask.Exception);
if (SelfConfig.SelfConfigRef.Value.Debug.ShowHandledErrorStackTraces)
Logger.updater.Error(downloadTask.Exception);
installFail?.Invoke(item, downloadTask.Exception);
continue;


Loading…
Cancel
Save