public ClrExceptionInformation(ClrDump clrDump, ClrException exception) { this.exception = exception; Message = clrDump.Eval(() => exception.Message); StackFrames = clrDump.Eval(() => exception.StackTrace.Select(frame => new StackFrameInformation(clrDump, frame))).ToList(); TypeName = exception.Type.Name; }
public ClrHeapObject(ulong address, ClrType type, ulong size, int generation, object simpleValue, ClrException exceptionValue) { Address = address; Type = type; Size = size; Generation = generation; SimpleValue = simpleValue; ExceptionValue = exceptionValue; }
/// <summary> /// Converts the specified exception. /// </summary> /// <param name="exception">The exception.</param> /// <returns>IClrException.</returns> public IClrException Convert(ClrMd.ClrException exception) { if (exception == null) { return(null); } var item = new ClrExceptionAdapter(this, exception); return(Cache.GetOrAdd <IClrException>(exception, () => item, () => item.Setup())); }
private static void DisplayException(ClrException exception, CommandExecutionContext context) { context.WriteLine("Exception object: {0:x16}", exception.Address); context.WriteLine("Exception type: {0}", exception.Type.Name); var innerException = exception.Inner; context.WriteLine("Message: {0}", exception.GetExceptionMessageSafe()); context.WriteLine("Inner exception: {0}", innerException == null ? "<none>" : String.Format("{0:x16}", innerException.Address)); if (context.TargetType != TargetType.DumpFileNoHeap) { // In no-heap dumps, stuff goes wrong inside DesktopException because some fields can't // be found. It can be fixed with a lot of refactoring (not relying on fields at all and // using offsets instead), but it's probably not such a big deal anyway. context.WriteLine("HResult: {0:x}", exception.HResult); } context.WriteLine("Stack trace:"); ClrThreadExtensions.WriteStackTraceToContext(null, exception.StackTrace, context, displayArgumentsAndLocals: false); }
public MDException(ClrException ex) { m_ex = ex; }