From 6cc2fefa5f8526b23af07ee5873b138738bd2392 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 17 Apr 2000 19:38:16 +0000 Subject: [PATCH] Set the exception if no provider is found. * camel-session.c (get_store_for_protocol_with_url): Set the exception if no provider is found. --- camel/ChangeLog | 3 +++ camel/camel-session.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/camel/ChangeLog b/camel/ChangeLog index a2a765f..e2d1bfe 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2000-04-17 Dan Winship + * camel-session.c (get_store_for_protocol_with_url): Set the + exception if no provider is found. + * camel-url.c: Add code to encode and decode %-escapes in URLs, and do some additional correctness-checking on URL syntax. From Tiago Antào with modifications by me. diff --git a/camel/camel-session.c b/camel/camel-session.c index 6cf8da1..7b672c5 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -185,8 +185,12 @@ get_store_for_protocol_with_url (CamelSession *session, const char *protocol, */ provider = camel_provider_get_for_protocol (protocol, PROVIDER_STORE); } - if (!provider) + if (!provider) { + camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID, + "No provider available for protocol " + "`%s'", protocol); return NULL; + } return CAMEL_STORE (camel_service_new (provider->object_type, session, url, ex)); -- 2.7.4