コード例 #1
0
 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;
 }
コード例 #2
0
ファイル: ClrHeapObject.cs プロジェクト: jstangroome/PSClrMD
 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;
 }
コード例 #3
0
        /// <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()));
        }
コード例 #4
0
ファイル: PrintException.cs プロジェクト: goldshtn/msos
 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);
 }
コード例 #5
0
 public MDException(ClrException ex)
 {
     m_ex = ex;
 }