Skip to content

Commit d276b9a

Browse files
update: added Exception messages
1 parent 1a95142 commit d276b9a

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

SimpleFileHandler.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,30 @@ public static void Append(string FilePath, string Content)
2424
[MethodImpl(MethodImplOptions.NoInlining)]
2525
public static void ProjectToLocation(Assembly CallingAssembly, string FileName)
2626
{
27+
try
28+
{
29+
Console.WriteLine(CallingAssembly.EntryPoint.DeclaringType.Namespace);
30+
}
31+
catch (Exception exception)
32+
{
33+
Console.WriteLine(exception.Message);
34+
}
35+
try
36+
{
37+
Console.WriteLine(Assembly.GetCallingAssembly().EntryPoint.DeclaringType.Namespace);
38+
}
39+
catch (Exception exception)
40+
{
41+
Console.WriteLine(exception.Message);
42+
}
43+
try
44+
{
45+
Console.WriteLine(Assembly.GetEntryAssembly().EntryPoint.DeclaringType.Namespace);
46+
}
47+
catch (Exception exception)
48+
{
49+
Console.WriteLine(exception.Message);
50+
}
2751
try
2852
{
2953
if (!Path.GetDirectoryName(FileName).Equals(string.Empty) && !Directory.Exists(Path.GetDirectoryName(FileName)))
@@ -34,9 +58,10 @@ public static void ProjectToLocation(Assembly CallingAssembly, string FileName)
3458
Assembly.GetExecutingAssembly().GetManifestResourceStream(CallingAssembly.EntryPoint.DeclaringType.Namespace + "." + Path.GetFileName(FileName)).CopyTo(ProjectFileStream);
3559
ProjectFileStream.Close();
3660
}
37-
catch
61+
catch (Exception exception)
3862
{
3963
Console.WriteLine("Cannot copy project file. Please make sure the file's build action is set to 'Embedded Resource'.");
64+
Console.WriteLine(exception.Message);
4065
}
4166
}
4267

0 commit comments

Comments
 (0)