2 writes to Exception
Microsoft.AspNetCore.InternalTesting (1)
Logging\TestLogger.cs (1)
54Exception = exception,
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\LogSinkProvider.cs (1)
42Exception = exception,
56 references to Exception
IIS.Tests (2)
MaxRequestBodySizeTests.cs (2)
362Assert.Same(thrownError, appErrorLog.Exception); 363Assert.Same(thrownError, badRequestLog.Exception);
InMemory.FunctionalTests (14)
BadHttpRequestTests.cs (4)
319if (context.EventId.Name == "ConnectionBadRequest" && context.Exception is BadHttpRequestException ex) 377if (context.EventId.Name == "ConnectionBadRequest" && context.Exception is BadHttpRequestException ex) 443if (context.EventId.Name == "ConnectionBadRequest" && context.Exception is BadHttpRequestException ex) 518if (context.EventId.Name == "ConnectionBadRequest" && context.Exception is BadHttpRequestException ex)
Http2\Http2StreamTests.cs (2)
4724&& w.Exception is ConnectionAbortedException && w.Exception.InnerException == expectedException);
ResponseTests.cs (8)
510Assert.Contains(TestSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 511&& ((BadHttpRequestException)w.Exception).StatusCode == StatusCodes.Status400BadRequest); 1150m.Exception is InvalidOperationException ex && 1207m.Exception is InvalidOperationException ex && 4134&& w.Exception is ConnectionAbortedException && w.Exception.InnerException == expectedException); 4764Assert.Contains(testSink.Writes, w => w.EventId.Id == 17 && w.LogLevel <= LogLevel.Debug && w.Exception is BadHttpRequestException 4765&& ((BadHttpRequestException)w.Exception).StatusCode == StatusCodes.Status400BadRequest);
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (2)
1057Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception); 1143Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception);
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (6)
ServerStreamingServerCallHandlerTests.cs (3)
121Assert.Equal("Exception!", exceptionWrite.Exception.Message); 163Assert.Equal(debugException, exceptionWrite.Exception); 200Assert.Equal("Exception!", exceptionWrite.Exception.Message);
UnaryServerCallHandlerTests.cs (3)
871Assert.Equal(debugException, exceptionWrite.Exception); 1058Assert.Equal("Error!", exceptionWrite.Exception.Message); 1088Assert.Equal("Error!", exceptionWrite.Exception.Message);
Microsoft.AspNetCore.Hosting.Tests (2)
WebHostBuilderTests.cs (2)
1230Assert.Contains(sink.Writes, w => w.Exception?.Message == "Startup exception"); 1254Assert.Contains(testSink.Writes, w => w.Exception?.Message == "Startup exception");
Microsoft.AspNetCore.Http.Extensions.Tests (7)
RequestDelegateFactoryTests.cs (2)
1950Assert.Same(exception, logMessage.Exception); 1983Assert.Same(exception, logMessage.Exception);
RequestDelegateGenerator\RequestDelegateCreationTests.Forms.cs (2)
944Assert.Same(ioException, logMessage.Exception); 978Assert.IsType<InvalidDataException>(logMessage.Exception);
RequestDelegateGenerator\RequestDelegateCreationTests.Logging.cs (3)
495Assert.Same(ioException, logMessage.Exception); 533Assert.Same(jsonException, logMessage.Exception); 613Assert.IsType<JsonException>(logMessage.Exception);
Microsoft.AspNetCore.InternalTesting (1)
Logging\WriteContext.cs (1)
28return Formatter(State, Exception);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestTests.cs (1)
397var errorLogs = TestSink.Writes.Where(w => w.LogLevel >= LogLevel.Error).Select(w => w.Exception);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
ConnectionDispatcherTests.cs (2)
68Assert.IsType<InvalidOperationException>(critical.Exception); 69Assert.Equal("Unexpected error listening", critical.Exception.Message);
HeartbeatTests.cs (1)
197Assert.Equal(ex, TestSink.Writes.Single(message => message.LogLevel == LogLevel.Error).Exception);
MessageBodyTests.cs (1)
780m.Exception is BadHttpRequestException ex &&
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
HubConnectionTests.cs (3)
1391Assert.Contains(exceptionSubstring, errorLog.Write.Exception.Message); 1445Assert.Contains(exceptionSubstring, errorLog.Write.Exception.Message); 1514return writeContext.Exception is HttpRequestException;
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisHubLifetimeManagerTests.cs (1)
125Assert.Equal("throw from connect", logs[0].Exception.Message);
Microsoft.AspNetCore.SignalR.Tests (6)
HubConnectionHandlerTests.cs (6)
500(w.Exception is InvalidDataException ide)); 502Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 530(w.Exception is InvalidDataException ide)); 532Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions."); 581(w.Exception is InvalidDataException ide)); 583Assert.Equal(exceptionLog.First().Exception.Message, $"The maximum message size of {maximumMessageSize}B was exceeded. The message size can be configured in AddHubOptions.");
Microsoft.AspNetCore.SignalR.Tests.Utils (7)
ServerLogScope.cs (1)
60logger.Log(write.LogLevel, write.EventId, write.State, write.Exception, write.Formatter);
src\Shared\SignalR\InProcessTestServer.cs (3)
144builder.AppendLine(FormattableString.Invariant($"{log.Timestamp:O} {log.Write.LoggerName} {log.Write.LogLevel}: {log.Write.Formatter(log.Write.State, log.Write.Exception)}")); 145if (log.Write.Exception != null) 147var message = log.Write.Exception.ToString();
src\Shared\SignalR\VerifyNoErrorScope.cs (3)
51string lineMessage = r.LoggerName + " - " + r.EventId.ToString() + " - " + r.Formatter(r.State, r.Exception); 52if (r.Exception != null) 57lineMessage += r.Exception;