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/11/head
Anairkoen Schno 5 years ago
parent
commit
046994930b
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 ShowCallSource = false;
public bool ShowDebug = false; public bool ShowDebug = false;
public bool ShowHandledErrorStackTraces = false;
public bool HideMessagesForPerformance = true; public bool HideMessagesForPerformance = true;
public int HideLogThreshold = 512; 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 /// A class to provide information about a mod on ModSaber.ML
/// </summary> /// </summary>
// ReSharper disable once IdentifierTypo // 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 public class ModsaberModInfo
{ {
/// <summary> /// <summary>


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

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


Loading…
Cancel
Save