Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed server-side exception handling #70

Merged
merged 4 commits into from
Nov 19, 2024
Merged

Conversation

yallie
Copy link
Collaborator

@yallie yallie commented Nov 19, 2024

See issue #69. Server class:

public class TestService : ITestService
{
	public void Error(string message) => throw new Exception(message);
}

Usage:

using var client = new RemotingClient(new ClientConfig()
{
    ConnectionTimeout = 5,
    InvocationTimeout = 5,
    SendTimeout = 5,
    MessageEncryption = false,
    ServerPort = _serverFixture.Server.Config.NetworkPort
});

client.Connect();

var proxy = client.CreateProxy<ITestService>();

// the call times out and throws a TimeoutException instead of the expected Exception
var ex = Assert.Throws<Exception>(() => proxy.Error("Message"));

@yallie yallie changed the title Added the unit tests for the server-side exceptions not being rethrown. Fixed server-side exception handling Nov 19, 2024
@yallie yallie merged commit 8c9f3ee into theRainbird:master Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant