mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Code quality fixes (NullReference checks, unused variables etc)
This commit is contained in:
parent
6ab6033f85
commit
ac08533727
99 changed files with 1252 additions and 1312 deletions
|
@ -29,13 +29,14 @@ using GreenshotPlugin.UnmanagedHelpers;
|
|||
using GreenshotPlugin.Core;
|
||||
using Greenshot.IniFile;
|
||||
using Greenshot.Drawing;
|
||||
using log4net;
|
||||
|
||||
namespace Greenshot.Helpers {
|
||||
/// <summary>
|
||||
/// Description of EnvironmentInfo.
|
||||
/// </summary>
|
||||
public static class EnvironmentInfo {
|
||||
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EnvironmentInfo));
|
||||
private static readonly ILog LOG = LogManager.GetLogger(typeof(EnvironmentInfo));
|
||||
private static bool? isWindows = null;
|
||||
|
||||
public static bool IsWindows {
|
||||
|
@ -157,8 +158,8 @@ namespace Greenshot.Helpers {
|
|||
|
||||
public static string BuildReport(Exception exception) {
|
||||
StringBuilder exceptionText = new StringBuilder();
|
||||
exceptionText.AppendLine(EnvironmentInfo.EnvironmentToString(true));
|
||||
exceptionText.AppendLine(EnvironmentInfo.ExceptionToString(exception));
|
||||
exceptionText.AppendLine(EnvironmentToString(true));
|
||||
exceptionText.AppendLine(ExceptionToString(exception));
|
||||
exceptionText.AppendLine("Configuration dump:");
|
||||
using (TextWriter writer = new StringWriter(exceptionText)) {
|
||||
IniConfig.GetIniSection<CoreConfiguration>().Write(writer, true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue