diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-02-27 16:39:34 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-02-27 17:43:16 +0200 |
commit | ecac92c60c1ca92aae0bb940c8a7952146c99df0 (patch) | |
tree | c8511528b612fe2a9097c5b28a98bc5cf13c690e /indra/llmessage/llcorehttputil.cpp | |
parent | f40c5b209b48b6dd1f8e345598104691ce6c932c (diff) |
#3627 Warn user about low memory on bad_alloc
Diffstat (limited to 'indra/llmessage/llcorehttputil.cpp')
-rw-r--r-- | indra/llmessage/llcorehttputil.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp index 918a69be6f..992e145758 100644 --- a/indra/llmessage/llcorehttputil.cpp +++ b/indra/llmessage/llcorehttputil.cpp @@ -295,7 +295,15 @@ void HttpCoroHandler::onCompleted(LLCore::HttpHandle handle, LLCore::HttpRespons } else { - result = this->handleSuccess(response, status); + try + { + result = this->handleSuccess(response, status); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("CoreHTTP") << "Failed to allocate memory for response handling." << LL_ENDL; + } } buildStatusEntry(response, status, result); |