From 2b138990f8531df51f38e5e15309e1c92483dd05 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 7 Jun 2013 18:05:14 -0700 Subject: ACME-508 : Surface facebook connection errors in a modal notification dialog --- indra/newview/llfacebookconnect.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'indra/newview/llfacebookconnect.cpp') diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 668ba04406..4c9de17e2e 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -33,6 +33,7 @@ #include "llcallingcard.h" // for LLAvatarTracker #include "llcommandhandler.h" #include "llhttpclient.h" +#include "llnotificationsutil.h" #include "llurlaction.h" /////////////////////////////////////////////////////////////////////////////// @@ -80,6 +81,11 @@ public: } else { + LLSD args(LLSD::emptyMap()); + std::stringstream msg; + msg << reason << " (Code " << status << ")"; + args["FAIL_REASON"] = msg.str(); + LLNotificationsUtil::add("FacebookCannotConnect",args); LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL; } } @@ -109,6 +115,11 @@ public: } else { + LLSD args(LLSD::emptyMap()); + std::stringstream msg; + msg << reason << " (Code " << status << ")"; + args["FAIL_REASON"] = msg.str(); + LLNotificationsUtil::add("FacebookCannotConnect",args); LL_WARNS("FacebookConnect") << "Failed to get a post response. reason: " << reason << " status: " << status << LL_ENDL; } } @@ -142,6 +153,11 @@ public: } else { + LLSD args(LLSD::emptyMap()); + std::stringstream msg; + msg << reason << " (Code " << status << ")"; + args["FAIL_REASON"] = msg.str(); + LLNotificationsUtil::add("FacebookCannotConnect",args); LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL; } } @@ -175,6 +191,14 @@ public: { LLFacebookConnect::instance().connectToFacebook(); } + else + { + LLSD args(LLSD::emptyMap()); + std::stringstream msg; + msg << reason << " (Code " << status << ")"; + args["FAIL_REASON"] = msg.str(); + LLNotificationsUtil::add("FacebookCannotConnect",args); + } } } @@ -198,6 +222,11 @@ public: } else { + LLSD args(LLSD::emptyMap()); + std::stringstream msg; + msg << reason << " (Code " << status << ")"; + args["FAIL_REASON"] = msg.str(); + LLNotificationsUtil::add("FacebookCannotConnect",args); LL_WARNS("FacebookConnect") << "Failed to get a response. reason: " << reason << " status: " << status << LL_ENDL; } } -- cgit v1.3