From: Luke Howard Date: Mon, 16 May 2011 08:05:20 +0000 (+0200) Subject: catch exceptions initialising Shibboleth X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.orig;a=commitdiff_plain;h=b92edca3c1508b22deb774005a40a6e43b80dd51 catch exceptions initialising Shibboleth --- diff --git a/mech_eap/util_shib.cpp b/mech_eap/util_shib.cpp index b01bf7b..15a8b44 100644 --- a/mech_eap/util_shib.cpp +++ b/mech_eap/util_shib.cpp @@ -434,13 +434,18 @@ gss_eap_shib_attr_provider::initWithJsonObject(const gss_eap_attr_ctx *ctx, bool gss_eap_shib_attr_provider::init(void) { - if (SPConfig::getConfig().getFeatures() == 0 && - ShibbolethResolver::init() == false) - return false; + bool ret = false; - gss_eap_attr_ctx::registerProvider(ATTR_TYPE_LOCAL, createAttrContext); + try { + if (SPConfig::getConfig().getFeatures() == 0) + ret = ShibbolethResolver::init(); + } catch (exception &e) { + } - return true; + if (ret) + gss_eap_attr_ctx::registerProvider(ATTR_TYPE_LOCAL, createAttrContext); + + return ret; } void