summaryrefslogtreecommitdiff
path: root/indra/llcommon
AgeCommit message (Collapse)Author
2016-08-26MAINT-5011: Add comments to LLCoros::toplevel() exception handlers.Nat Goodspeed
2016-08-25MAINT-5011: Remove unreferenced param name to avoid fatal warningNat Goodspeed
2016-08-18MAINT-5011: Catch unhandled exceptions in LLCoros coroutines.Nat Goodspeed
Wrap coroutine call in try/catch in top-level coroutine wrapper function LLCoros::toplevel(). Distinguish exception classes derived from LLContinueError (log and continue) from all others (crash with LL_ERRS). Enhance CRASH_ON_UNHANDLED_EXCEPTIONS() and LOG_UNHANDLED_EXCEPTIONS() macros to accept a context string to supplement the log message. This lets us replace many places that called boost::current_exception_diagnostic_information() with LOG_UNHANDLED_EXCEPTIONS() instead, since the explicit calls were mostly to log supplemental information. Provide supplemental information (coroutine name, function parameters) for some of the previous LOG_UNHANDLED_EXCEPTIONS() calls. This information duplicates LL_DEBUGS() information at the top of these functions, but in a typical log file we wouldn't see the LL_DEBUGS() message. Eliminate a few catch (std::exception e) clauses: the information we get from boost::current_exception_diagnostic_information() in a catch (...) clause makes it unnecessary to distinguish. In a few cases, add a final 'throw;' to a catch (...) clause: having logged the local context info, propagate the exception to be caught by higher-level try/catch. In a couple places, couldn't resist reconciling indentation within a particular function: tabs where the rest of the function uses tabs, spaces where the rest of the function uses spaces. In LLLogin::Impl::loginCoro(), eliminate some confusing comments about an array of rewritten URIs that date back to a long-deleted implementation.
2016-08-18MAINT-5011: Use BOOST_CURRENT_FUNCTION instead of __PRETTY_FUNCTION__Nat Goodspeed
since Visual Studio doesn't know __PRETTY_FUNCTION__, and Boost already has a portable macro to Do The Right Thing.
2016-08-17MAINT-5011: Try to enrich catch (...) logging throughout viewer.Nat Goodspeed
Turns out we have a surprising number of catch (...) clauses in the viewer code base. If all we currently do is LL_ERRS() << "unknown exception" << LL_ENDL; then call CRASH_ON_UNHANDLED_EXCEPTION() instead. If what we do is LL_WARNS() << "unknown exception" << LL_ENDL; then call LOG_UNHANDLED_EXCEPTION() instead. Since many places need LOG_UNHANDLED_EXCEPTION() and nobody catches LLContinueError yet, eliminate LLContinueError& parameter from LOG_UNHANDLED_EXCEPTION(). This permits us to use the same log message as CRASH_ON_UNHANDLED_EXCEPTION(), just with a different severity level. Where a catch (...) clause actually provides contextual information, or makes an error string, add boost::current_exception_diagnostic_information() to try to figure out actual exception class and message.
2016-08-17Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2016-08-17MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().Nat Goodspeed
A level of preprocessor indirection lets us later change the implementation if desired.
2016-08-17MAINT-5011: Add llexception_test.cpp with tests (and conclusions).Nat Goodspeed
llexception_test.cpp is an unusual test source in that it need not be verified on every build, so its invocation in indra/llcommon/CMakeLists.txt is commented out with that remark. Its purpose is to help a developer decide what base class(es) to use for LLException, how to throw and how to catch. Our current conclusions are written up as comments in llexception_test.cpp. Added CRASH_ON_UNHANDLED_EXCEPTION() and LOG_UNHANDLED_EXCEPTION() macros to llexception.h -- macros to log __FILE__, __LINE__ and __PRETTY_FUNCTION__ of the catch site. These invoke functions in llexception.cpp so we don't need to #include llerror.h for every possible catch site.
2016-08-15merge from viewer-releaseBrad Payne (Vir Linden)
2016-08-11add convenience function ll_stream_notation_sd for compact representation of ↵Oz Linden
llsd
2016-08-10MAINT-6608 FIXED URI parser problem with links with username, passwordMnikolenko Productengine
2016-07-27MAINT-6585: pull into fork of viewer-neko for pull requestGlenn Glazer
2016-07-21explicit not available for conversion operators in Linux yetRider Linden
2016-07-21add location details to apr status loggingOz Linden
2016-07-21MAINT-6570: Feedback from code review.Rider Linden
2016-07-21MergeRider Linden
2016-07-21MAINT=6585: remove extraneous path manipulation from llleap_testGlenn Glazer
2016-07-21MAINT=6585: fix llleap_test to use llbase not indra.baseGlenn Glazer
2016-07-20Fix for linux buildRider Linden
2016-07-20MAINT=6585: fix llsdserialize_testGlenn Glazer
2016-07-20MAINT-6570: Changes for LLCheckedHandle plus some timeout issues from ↵Rider Linden
AndreyK regarding script compiles/resets.
2016-07-19MAINT-5011: Introduce LLException base class for viewer exceptions.Nat Goodspeed
This also introduces LLContinueError for exceptions which should interrupt some part of viewer processing (e.g. the current coroutine) but should attempt to let the viewer session proceed. Derive all existing viewer exception classes from LLException rather than from std::runtime_error or std::logic_error. Use BOOST_THROW_EXCEPTION() rather than plain 'throw' to enrich the thrown exception with source file, line number and containing function.
2016-07-05SL-109 - little bit of log spam cleanupBrad Payne (Vir Linden)
2016-07-01Automated merge with ssh://bitbucket.org/nat_linden/viewer-mac-mainloopNat Goodspeed
2016-06-30DRTVWR-418: Unify control flow through LLAppViewer across platforms.Nat Goodspeed
The LLApp API used to consist of init(), mainLoop(), cleanup() methods. This makes sense -- but on Mac that structure was being subverted. The method called mainLoop() was in fact being called once per frame. There was initialization code in the method, which (on Mac) needed to be skipped with an already-initialized bool. There was a 'while' loop which (on Mac) needed to be turned into an 'if' instead so the method would return after every frame. Rename LLApp::mainLoop() to frame(). Propagate through subclasses LLAppViewer and LLCrashLogger. Document the fact that frame() returns true to mean "done." (This was always the case, but had to be inferred from the code.) Rename the Mac Objective-C function mainLoop to oneFrame. Rename the C++ free function it calls from runMainLoop() to pumpMainLoop(). Add comments to llappdelegate-objc.mm explaining (inferred) control flow. Change the Linux viewer main() and the Windows viewer WINMAIN() from a single LLAppViewer::mainLoop() call to repeatedly call frame() until it returns true. Move initialization code from the top of LLAppViewer::frame() to the init() method, where it more properly belongs. Remove corresponding mMainLoopInitialized flag (and all references) from LLAppViewer. Remove 'while (! LLApp::isExiting())' (or on Mac, 'if (! LLApp::isExiting())') from LLAppViewer::frame() -- thus unindenting the whole body of the 'while' and causing many lines of apparent change. (Apologies to reviewers.) There are four LLApp states: APP_STATUS_RUNNING, APP_STATUS_QUITTING, APP_STATUS_STOPPED and APP_STATUS_ERROR. Change LLAppViewer::frame() return value from (isExiting()) (QUITTING or ERROR) to (! isRunning()). I do not know under what circumstances the state might transition to STOPPED during a frame() call, but I'm quite sure that if it does, we don't want to call frame() again. We only want a subsequent call if the state is RUNNING. Also rename mainLoop() method in LLCrashLogger subclasses LLCrashLoggerWindows, LLCrashLoggerMac, LLCrashLoggerLinux. Of course it's completely up to the frame() method whether to yield control; none of those in fact do. Honor protocol by returning true (frame() is done), even though each one's main() caller ignores the return value. In fact LLCrashLoggerWindows::mainLoop() wasn't using the return protocol correctly anyway, returning wParam or 0 or 1 -- possibly because the return protocol was never explicitly documented. It should always return true: "I'm done, don't call me again."
2016-06-28DRTVWR-418: Double coroutine stack size for 64-bit buildsNat Goodspeed
on the advice of NickyD.
2016-06-24MergeRider Linden
2016-06-24MAINT-6521: A compare against a static const empty string causes segfault in ↵Rider Linden
integration tests on Mac and Linux. Use empty() test instead.
2016-06-23MergeRider Linden
2016-06-23MAINT-6521: Allow anonymous connections to bypass the dependency and order ↵Rider Linden
tracking.
2016-06-16Merged in lindenlab/viewer-lynxAndreyL ProductEngine
2016-06-14MAINT-5040 Warning "ll_apr_warn_status: APR: Connection refused" continually ↵Mnikolenko Productengine
appears on Linux
2016-06-13MAINT-6366 - diagnostics related to animation asset downloadsBrad Payne (Vir Linden)
2016-06-01MAINT-6446 Correct password length handlingandreykproductengine
2016-05-21merged jelly-doll viewer-release into bentoBrad Payne (Vir Linden)
2016-05-19Automated merge with tip of viewer-release to pick up 4.0.5callum_linden
2016-05-20Merged in lindenlab/viewer-lynxAndreyL ProductEngine
2016-05-18MAINT-6409 invisiprims should be preloadedandreykproductengine
2016-05-06Merge with https://bitbucket.org/oz_linden/maint-5974 to pick up a variety ↵callum_linden
of fixes
2016-05-06Merge with viewer-releasecallum_linden
2016-05-06mergeBrad Payne (Vir Linden)
2016-05-06mergeBrad Payne (Vir Linden)
2016-05-06merge 4.0.4-release and MAINT-5974Oz Linden
2016-05-06merge changes for 4.0.4-releaseOz Linden
2016-04-26MAINT-6336: Initialize TempBoundListener with constructorRider Linden
2016-04-26MAINT-6336: Put the timeout upstream of the suspending pump and fire the ↵Rider Linden
timeout it. Also some cleanup on LLSD construction in vivox.
2016-04-24Windows z64: Disable warning 4267 via llpreprocessor rather than cmake filesNicky
(transplanted from 165fa5852652a1da005cf3b2201c192f028efd43)
2016-04-22Fasttimers: Windows) Always use the __rdtsc() intrinsic rather than inline ↵Nicky
assembly. Linux/OSX) The rtdsc assembly intruction is clobbering EAX and EDX, the snippet was not protecting EDX accordingly. (transplanted from 6307b134f821390367d4c86a03b9a492ac7ed282)
2016-04-22MAINT-6336: Centralize waiting on event pump with a timeout. Shorten the ↵Rider Linden
lifespan of a timeout event pump lifespan to be no longer than necessary. Change all references to the LLEventTimer to instead uses the centralized version.
2016-04-22Windows: USe the correct datatypes when calling the Windows API.Nicky
(transplanted from 8b0c42b1a4f0416a17c8ec6078a85c5773f69a25)