diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-03-17 14:21:58 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-03-17 14:21:58 -0700 |
commit | 11e6e208d43f1347037fb312921a65af138f47b4 (patch) | |
tree | 2c1fcac6827dab21481b70d37d1f0f83efea8adb | |
parent | b5b5aa73539fa7402a9eed9842108f32b27abd97 (diff) |
Adding error handling to share to web feature.
Reviewed by Callum
-rw-r--r-- | indra/newview/llfloatersnapshot.cpp | 19 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 7 |
2 files changed, 24 insertions, 2 deletions
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp index 7b0486da48..2df297fc42 100644 --- a/indra/newview/llfloatersnapshot.cpp +++ b/indra/newview/llfloatersnapshot.cpp @@ -1045,9 +1045,24 @@ class LLSendWebResponder : public LLHTTPClient::Responder { public: - void result(const LLSD& content) + virtual void error(U32 status, const std::string& reason) { - LLWeb::loadURLExternal(content["response_url"]); + llwarns << status << ": " << reason << llendl; + LLNotificationsUtil::add("ShareToWebFailed"); + } + + virtual void result(const LLSD& content) + { + std::string response_url = content["response_url"].asString(); + + if (!response_url.empty()) + { + LLWeb::loadURLExternal(response_url); + } + else + { + LLNotificationsUtil::add("ShareToWebFailed"); + } } }; diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 5680b91c05..c39a91281e 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -5294,6 +5294,13 @@ Failed to find [TYPE] named [DESC] in database. <notification icon="notify.tga" + name="ShareToWebFailed" + type="notify"> + Failed to upload image to web. + </notification> + + <notification + icon="notify.tga" name="InvalidWearable" type="notify"> The item you are trying to wear uses a feature that your Viewer can't read. Please upgrade your version of [APP_NAME] to wear this item. |