-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtil.cs
More file actions
46 lines (42 loc) · 1.35 KB
/
Copy pathUtil.cs
File metadata and controls
46 lines (42 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//-------------------------------------------------------------------
// Copyright © 2012 Kindel Systems, LLC
// http://www.kindel.com
// charlie@kindel.com
//
// Published under the MIT License.
// Source control on SourceForge
// http://sourceforge.net/projects/mcecontroller/
//-------------------------------------------------------------------
using System;
namespace MCEControl
{
/// <summary>
/// Summary description for Util.
/// </summary>
public class Util
{
private Util()
{
//
// TODO: Add constructor logic here
//
}
public static void DumpException(Exception ex)
{
WriteExceptionInfo(ex);
if (null != ex.InnerException)
{
WriteExceptionInfo(ex.InnerException);
}
}
public static void WriteExceptionInfo(Exception ex)
{
Console.WriteLine("--------- Exception Data ---------");
Console.WriteLine("Message: {0}", ex.Message);
Console.WriteLine("Exception Type: {0}", ex.GetType().FullName);
Console.WriteLine("Source: {0}", ex.Source);
Console.WriteLine("StrackTrace: {0}", ex.StackTrace);
Console.WriteLine("TargetSite: {0}", ex.TargetSite);
}
}
}