Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3044 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
4 changed files with 97 additions and 1 deletions
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Justin Dearing" email="zippy1981@gmail.com"/>
|
||||
// <version>$Revision: 2900 $</version>
|
||||
// </file>
|
||||
|
||||
using System.Text; |
||||
using Debugger.Wrappers.CorDebug; |
||||
|
||||
namespace Debugger |
||||
{ |
||||
/// <summary>
|
||||
/// This contains the nested InnerExceptions of a <c>Debugger.Exception</c> class
|
||||
/// </summary>
|
||||
/// <see cref="Debugger.Exception" />
|
||||
/// <seealso cref="System.Exception" />
|
||||
public class DebuggerInnerException |
||||
{ |
||||
Debugger.Value exceptionValue; |
||||
|
||||
internal DebuggerInnerException (Debugger.Value exception) { |
||||
this.exceptionValue = exception; |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// The <c>InnerException</c> property of the exception.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
public DebuggerInnerException InnerException { |
||||
get { |
||||
Debugger.Value exVal = this.exceptionValue.GetMemberValue("_innerException"); |
||||
return (exVal.IsNull) ? null : new DebuggerInnerException(exVal); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// The <c>Message</c> property of the exception.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
public string Message { |
||||
get { |
||||
return this.exceptionValue.GetMemberValue("_message").AsString; |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// The <c>GetType().FullName</c> of the exception.
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Exception" />
|
||||
public string Type { |
||||
get { |
||||
return this.exceptionValue.Type.FullName; |
||||
} |
||||
} |
||||
|
||||
public override string ToString() |
||||
{ |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.AppendFormat("Type: {0}", this.Type); |
||||
sb.AppendLine(); |
||||
sb.AppendLine("Message:"); |
||||
sb.Append(this.Message); |
||||
|
||||
return sb.ToString(); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue