msos.CommandExecutionContext.WriteError C# (CSharp) Method

WriteError() public method

public WriteError ( string value ) : void
value string
return void
        public void WriteError(string value)
        {
            Printer.WriteError(value);
        }

Usage Example

Esempio n. 1
0
        public void Execute(CommandExecutionContext context)
        {
            if (ExceptionAddress != 0)
            {
                var heap = context.Runtime.GetHeap();
                var type = heap.GetObjectType(ExceptionAddress);
                if (type == null || !type.IsException)
                {
                    context.WriteError("The specified address is not the address of an Exception-derived object.");
                    return;
                }

                DisplayException(heap.GetExceptionObject(ExceptionAddress), context);
            }
            else
            {
                var thread = context.CurrentThread;
                if (thread == null)
                {
                    context.WriteError("There is no current managed thread");
                    return;
                }
                if (thread.CurrentException == null)
                {
                    context.WriteLine("There is no current managed exception on this thread");
                    return;
                }
                DisplayException(thread.CurrentException, context);
            }
        }
All Usage Examples Of msos.CommandExecutionContext::WriteError