summaryrefslogtreecommitdiff
path: root/indra/newview/llsecapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsecapi.cpp')
-rw-r--r--indra/newview/llsecapi.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llsecapi.cpp b/indra/newview/llsecapi.cpp
index 4f9f83b6f2..72d7cf1e45 100644
--- a/indra/newview/llsecapi.cpp
+++ b/indra/newview/llsecapi.cpp
@@ -29,6 +29,8 @@
#include "llviewerprecompiledheaders.h"
#include "llsecapi.h"
#include "llsechandler_basic.h"
+#include "llexception.h"
+#include "stringize.h"
#include <openssl/evp.h>
#include <openssl/err.h>
#include <map>
@@ -64,12 +66,12 @@ void initializeSecHandler()
}
catch (LLProtectedDataException e)
{
- exception_msg = e.getMessage();
+ exception_msg = e.what();
}
}
if (!exception_msg.empty()) // an exception was thrown.
{
- throw LLProtectedDataException(exception_msg.c_str());
+ LLTHROW(LLProtectedDataException(exception_msg));
}
}
@@ -101,6 +103,7 @@ std::ostream& operator <<(std::ostream& s, const LLCredential& cred)
LLSD LLCredential::getLoginParams()
{
LLSD result = LLSD::emptyMap();
+ std::string username;
try
{
if (mIdentifier["type"].asString() == "agent")
@@ -109,17 +112,19 @@ LLSD LLCredential::getLoginParams()
result["passwd"] = "$1$" + mAuthenticator["secret"].asString();
result["first"] = mIdentifier["first_name"];
result["last"] = mIdentifier["last_name"];
-
+ username = result["first"].asString() + " " + result["last"].asString();
}
else if (mIdentifier["type"].asString() == "account")
{
result["username"] = mIdentifier["account_name"];
result["passwd"] = mAuthenticator["secret"];
-
+ username = result["username"].asString();
}
}
catch (...)
{
+ // nat 2016-08-18: not clear what exceptions the above COULD throw?!
+ LOG_UNHANDLED_EXCEPTION(STRINGIZE("for '" << username << "'"));
// we could have corrupt data, so simply return a null login param if so
LL_WARNS("AppInit") << "Invalid credential" << LL_ENDL;
}