12 instantiations of HubException
Microsoft.AspNetCore.SignalR.Client.Core (4)
HubConnection.cs (2)
1542throw new HubException( 1666connectionState.CloseException = new HubException($"The server closed the connection with the following error: {closeMessage.Error}");
Internal\InvocationRequest.cs (2)
109Fail(new HubException(completionMessage.Error)); 182Fail(new HubException(completionMessage.Error));
Microsoft.AspNetCore.SignalR.Core (6)
HubConnectionHandler.cs (1)
212disconnectException = new HubException(connection.CloseMessage.Error);
Internal\DefaultHubDispatcher.cs (3)
352var ex = new HubException($"Client sent {clientStreamLength} stream(s), Hub method expects {serverStreamLength}."); 622throw new HubException($"Unknown hub method '{hubMethodName}'"); 815throw new HubException("Method does not exist.");
src\SignalR\common\Shared\ClientResultsManager.cs (1)
30tcs.SetException(new HubException(completionMessage.Error));
StreamTracker.cs (1)
81converter.TryComplete(message.HasResult || message.Error == null ? null : new HubException(message.Error));
Microsoft.AspNetCore.SignalR.StackExchangeRedis (1)
src\SignalR\common\Shared\ClientResultsManager.cs (1)
30tcs.SetException(new HubException(completionMessage.Error));
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTestUtils\Hubs.cs (1)
140throw new HubException("This is a hub exception");
65 references to HubException
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
1566catch (HubException)
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (37)
HubConnectionTests.cs (30)
657var ex = await Assert.ThrowsAsync<HubException>(async () => 1054var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync().DefaultTimeout()); 1081var ex = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync("!@#$%")).DefaultTimeout(); 1108var ex = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync("!@#$%", 10, "test")).DefaultTimeout(); 1135var ex = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync("Echo", "p1", 42)).DefaultTimeout(); 1162var ex = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync("Echo", new[] { 42 })).DefaultTimeout(); 1190var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync().DefaultTimeout()); 1218var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync().DefaultTimeout()); 1246var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync().DefaultTimeout()); 1273var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync()).DefaultTimeout(); 1300var ex = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync("Stream", 3)).DefaultTimeout(); 1327var ex = await Assert.ThrowsAsync<HubException>(() => channel.ReadAndCollectAllAsync()).DefaultTimeout(); 1375var hubException = await Assert.ThrowsAsync<HubException>(() => result).DefaultTimeout(); 1429var hubException = await Assert.ThrowsAsync<HubException>(() => result).DefaultTimeout(); 1463var hubException = await Assert.ThrowsAsync<HubException>(() => connection.InvokeAsync<int>("StreamEcho", new List<string> { "1", "2" }).DefaultTimeout());
HubConnectionTests.Tracing.cs (6)
505var ex = await Assert.ThrowsAsync<HubException>(async () => 547Assert.Equal(typeof(HubException).FullName, tags["error.type"]); 556Assert.Equal(typeof(HubException).FullName, tags["error.type"]); 642Assert.Equal(typeof(HubException).FullName, tags["error.type"]); 652Assert.Equal(typeof(HubException).FullName, tags["error.type"]);
HubProtocolVersionTests.cs (1)
181await ExceptionAssert.ThrowsAsync<HubException>(
Microsoft.AspNetCore.SignalR.Client.Tests (5)
HubConnectionTests.Protocol.cs (4)
306var ex = await Assert.ThrowsAsync<HubException>(() => invokeTask).DefaultTimeout(); 352var ex = await Assert.ThrowsAsync<HubException>(async () => await channel.ReadAndCollectAllAsync()).DefaultTimeout();
HubConnectionTests.Reconnect.cs (1)
930Assert.IsType<HubException>(retryContexts[1].RetryReason);
Microsoft.AspNetCore.SignalR.Common (5)
HubException.cs (5)
14/// of exceptions that occur on the server to the client. However, instances of <see cref="HubException"/> <b>are</b> sent to the client. 20/// Initializes a new instance of the <see cref="HubException"/> class. 27/// Initializes a new instance of the <see cref="HubException"/> class 36/// Initializes a new instance of the <see cref="HubException"/> class 46/// Initializes a new instance of the <see cref="HubException"/> class.
Microsoft.AspNetCore.SignalR.Core (2)
Internal\DefaultHubDispatcher.cs (1)
352var ex = new HubException($"Client sent {clientStreamLength} stream(s), Hub method expects {serverStreamLength}.");
Internal\ErrorMessageHelper.cs (1)
10if (exception is HubException || includeExceptionDetails)
Microsoft.AspNetCore.SignalR.Specification.Tests (9)
HubLifetimeManagerTestBase.cs (3)
223var ex = await Assert.ThrowsAsync<HubException>(() => resultTask).DefaultTimeout(); 362await Assert.ThrowsAsync<HubException>(() => invoke1).DefaultTimeout();
ScaleoutHubLifetimeManagerTests.cs (6)
524var ex = await Assert.ThrowsAsync<HubException>(() => resultTask).DefaultTimeout(); 575var ex = await Assert.ThrowsAsync<HubException>(() => invoke1).DefaultTimeout(); 656var ex = await Assert.ThrowsAsync<HubException>(() => resultTask).DefaultTimeout();
Microsoft.AspNetCore.SignalR.Tests (6)
HubConnectionHandlerTests.ClientResult.cs (4)
384var ex = await Assert.ThrowsAsync<HubException>(() => resultTask).DefaultTimeout(); 429var ex = await Assert.ThrowsAsync<HubException>(() => resultTask).DefaultTimeout();
HubConnectionHandlerTests.cs (2)
5175var ex = Assert.IsType<HubException>(state.DisconnectedException);