aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-02-11 12:43:57 -0500
committerMichael <[email protected]>2017-02-11 12:43:57 -0500
commitd90ea0ba0126f0a4bee6fd200e1fb5219ad884dc (patch)
treeed3b5babb6a73767c12b0173b53280aa8cec9763 /ShiftOS_TheReturn
parentc7a50f87efce6c5a151b66d87a29704b919af7c4 (diff)
downloadshiftos_thereturn-d90ea0ba0126f0a4bee6fd200e1fb5219ad884dc.tar.gz
shiftos_thereturn-d90ea0ba0126f0a4bee6fd200e1fb5219ad884dc.tar.bz2
shiftos_thereturn-d90ea0ba0126f0a4bee6fd200e1fb5219ad884dc.zip
commit really safe for work
crash handler now shows assemblyname and assemblydescription
Diffstat (limited to 'ShiftOS_TheReturn')
-rw-r--r--ShiftOS_TheReturn/CrashHandler.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/ShiftOS_TheReturn/CrashHandler.cs b/ShiftOS_TheReturn/CrashHandler.cs
index a723136..734f1a9 100644
--- a/ShiftOS_TheReturn/CrashHandler.cs
+++ b/ShiftOS_TheReturn/CrashHandler.cs
@@ -109,7 +109,10 @@ namespace ShiftOS.Engine
System.IO.FileInfo fileInfo = new System.IO.FileInfo(assembly.Location);
DateTime lastModified = fileInfo.LastWriteTime;
- string rtbcrash_Text = $@" === ShiftOS has crashed ===
+ string rtbcrash_Text = $@" === {AssemblyName} has crashed. ===
+
+Game: {AssemblyName}
+Description: {AssemblyDescription}
Basic Information For User:
---------------------------------
@@ -195,5 +198,21 @@ Stack trace:
this.Close();
Application.Restart();
}
+
+ public static string AssemblyName { get; private set; }
+ public static string AssemblyDescription { get; private set; }
+
+ public static void SetGameMetadata(Assembly assembly)
+ {
+ AssemblyName = assembly.GetName().Name;
+ foreach(var attr in assembly.GetCustomAttributes(true))
+ {
+ if(attr is AssemblyDescriptionAttribute)
+ {
+ AssemblyDescription = (attr as AssemblyDescriptionAttribute).Description;
+ }
+ }
+
+ }
}
}