dotnetrdf icon indicating copy to clipboard operation
dotnetrdf copied to clipboard

Exception message contains the same text twice

Open EvkaS opened this issue 6 years ago • 2 comments

When I try to query the endpoint that doesn't exists, I receive an exception message with the same text twice.

Example code:

SparqlRemoteEndpoint endpoint = new SparqlRemoteEndpoint(new Uri("http://dbpedi"));
ISparqlQueryProcessor processor = new RemoteQueryProcessor(endpoint);
processor.ProcessQuery(query, rdfCallback, resultsCallback, state);

// process result using TaskCompletionSource
// getting AsyncError

string error = ((AsyncError)results).Error.InnerException.Message;
Console.WriteLine(error);

I receive the following error:

No such host is known No such host is known

EvkaS avatar May 06 '19 15:05 EvkaS

Do you think this is caused by dotNetRDF or could it be a side-effect of async code? AggregateException and such?

tpluscode avatar May 07 '19 21:05 tpluscode

((AsyncError)results).Error.InnerException has type System.Net.WebException and its message is

No such host is known No such host is known

((AsyncError)results).Error.InnerException.InnerException has type System.Net.Http.HttpRequestException and its message is

No such host is known

((AsyncError)results).Error.InnerException.InnerException.InnerException has type System.Net.Sockets.SocketException and its message is

No such host is known

Next InnerException is null.

EvkaS avatar May 09 '19 15:05 EvkaS

I think this looks like an issue with System.Net APIs and not with dotNetRDF.

kal avatar Sep 10 '23 12:09 kal