Commit Graph

1117 Commits (5dcd81c15507ad8f487e5727bc7a94de82f6fb45)

Author SHA1 Message Date
Nat Goodspeed 4d10172d8b MAINT-5011: Catch unhandled exceptions in LLCoros coroutines.
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-18 17:33:44 -04:00
Nat Goodspeed 993f54f6e9 MAINT-5011: Try to enrich catch (...) logging throughout viewer.
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-17 15:40:03 -04:00
Nat Goodspeed e72bdc9bc5 Automated merge with ssh://bitbucket.org/lindenlab/viewer-release 2016-08-17 11:41:12 -04:00
Nat Goodspeed 5e9d2f57c8 MAINT-5011: Use LLTHROW() instead of plain BOOST_THROW_EXCEPTION().
A level of preprocessor indirection lets us later change the implementation if
desired.
2016-08-17 11:36:24 -04:00
Nat Goodspeed 9c49a6c91d MAINT-5011: Introduce LLException base class for viewer exceptions.
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-19 16:25:25 -04:00
Nat Goodspeed b031b1a625 MAINT-5011: Derive remaining exception classes from std::exception.
In particular:
NotImplemented in llhttpnode.cpp
RelocateError in llupdateinstaller.cpp
LLProtectedDataException, LLCertException and subclasses in llsecapi.h

Had to add no-throw destructor overrides to LLCertException and subclasses
because otherwise clang complains that the implicitly-generated destructor's
exception specification is more lax than the base class's.
2016-07-13 10:43:36 -04:00
Rider Linden a3c4d1cd20 Merge MAINT-6486 2016-06-13 09:23:20 -07:00
Rider Linden 1e803a6bd7 MAINT-6486: Be sure that all the script queue functions hit all objects and scripts in those objects. Convert from responders and callbacks to coroutines. 2016-06-10 12:33:39 -07:00
AndreyL ProductEngine b25a22a2c1 Merged in lindenlab/viewer-release 2016-05-19 23:02:37 +03:00
Oz Linden 950c41d184 merge 4.0.4-release and MAINT-5974 2016-05-06 10:28:42 -04:00
Mnikolenko Productengine b2fd397818 MAINT-6220 enable searching of the friend list with the classic username of the avatar. 2016-05-04 11:31:00 +03:00
Rider Linden 4d9dd3271b MAINT-6338: Add methods for getting and setting boolean properties from gSavedSettings in the HTTPCore. Use those methods to access new key HTTPLogBodyOnError. Dump body of HTTP message to log in case of error if this key is true. 2016-04-25 12:06:33 -07:00
Rider Linden 118e82e477 MAINT-6305: Serialize the AIS calls by reducing the queue size to 1, move the bake request out of the AIS queue. 2016-04-13 22:40:49 +01:00
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Rider Linden b8c1976460 Merge 2016-03-17 13:14:21 -07:00
Oz Linden 31f3db0291 merge changes for DRTVWR-417 2016-03-16 13:08:06 -04:00
Oz Linden 5822fb00b6 merge DRTVWR-398 build cleanup fixes 2016-03-07 12:41:11 -05:00
andreykproductengine 58bb4116db MAINT-6066 crash in LLTransferSource::getID() 2016-02-10 19:56:08 +02:00
andreykproductengine 1e682ef5ca MAINT-6066 crash in LLTransferSource::getID() 2016-01-20 18:28:49 +02:00
Oz Linden bc22e58743 merge changes for 4.0.1-release 2016-01-15 16:55:04 -05:00
Rider Linden 6fca0eaa00 More rt lib 2015-12-18 09:59:03 -08:00
Rider Linden 6b4151d895 Adding RT to another cmake file for Linux 2015-12-18 09:55:12 -08:00
Rider Linden 2763bbd975 Initial changes for Vivox/Azumarill merge. Lots of temporary code and conditional compile switches. Begin switch from statemachine to coroutine. 2015-12-04 14:27:22 -08:00
Oz Linden 2dcfa3b6bd Suppress some overly verbose logging 2016-02-12 16:58:41 -05:00
Oz Linden be8844ff3b MAINT-1945: correct total bytes sent in log stats 2016-02-12 16:58:33 -05:00
Oz Linden c8726aba30 remove execute permission from many files that should not have it 2015-11-10 09:48:56 -05:00
Rider Linden d64ddb54ca MAINT-5820: Add a success/failure result to HTTP body parse method and react to that rather than an "undefined" LLSD 2015-11-03 14:22:42 -08:00
callum_linden 0c3c3347c7 silly typo that builds on windows - this fixes mac/linux builds 2015-10-20 17:25:42 -07:00
callum_linden c16e726d0e MAINT-5711 FIX2 auto login for profiles - final part retrieves the URL to set cookie for
from the message sent over by login.cgi
2015-10-20 14:44:36 -07:00
Rider Linden bbb9d4f21b MAINT-5732: Change to the way event polling handles error conditions and cancel calls.
Refactor any remaining LLCore::HTTPHandlers to use boost::shared_ptr
Started minor refactor in the materials manager into coroutines (unfinished)
2015-10-14 17:46:24 -07:00
Rider Linden 1356be0fe9 MAINT-5691: Browser was using deprecated outbox display type AND not correctly returning error body to application.
LLCore:HTTP now will provide and LLSD translation of the message body when possible in the case of an error HTTP result
VMM alert boxes now use type="alertmodal" rather than "outbox"
2015-10-07 16:09:08 -07:00
Rider Linden edd23c42fa MAINT-5693: Consolidated the avatar appearance request into a coroutine. If the request fails because of a stale COF, then rerequest with the corrected one. 2015-10-06 14:17:37 -07:00
Rider Linden 2d2c90157d Remove ares dependency from build. 2015-09-23 15:48:06 -07:00
Rider Linden 1eed334e7f MAINT-5629: Remove llares and llareslistener. Login now does not attempt to do a lookup on the server names and rewrite the URL.
MAINT-5614: Bad password status correctly detected.
2015-09-21 10:59:58 -07:00
Rider Linden cf835a80cd Pref instance() over getInstance() 2015-09-18 16:36:49 -07:00
Rider Linden 75c6549fde Set consistent terminology for yield/wait -> suspend for coroutines. 2015-09-18 11:39:22 -07:00
Rider Linden 907efc9cc9 MAINT-5507: Remove llcurl, move constant values and untilities to llcorehttp lib 2015-09-15 17:01:26 -07:00
Rider Linden 5f7985f6a7 MAINT-5507: Removed some no longer used static variables fro llcurl.cpp 2015-09-14 16:43:36 -07:00
Rider Linden 196caf21a8 MAINT-5507: Removal of sdrpc client/server
MAINT-5507: removal of LLCurl::Easy, LLCurl::Multi LLCurl::Responder
2015-09-14 16:10:20 -07:00
Rider Linden 32912a3958 MAINT-5507: Test checkin with RPC code and URL request disabled. Make sure it does not break non windows builds. 2015-09-14 13:33:50 -07:00
Rider Linden 97236a42ca MAINT-5507: Remove HTTPClient and related cruft. 2015-09-14 11:15:23 -07:00
Rider Linden f2da6ec2ac Bit of cleanup around Translation and remove httpassetstorage 2015-09-11 17:34:53 -07:00
Rider Linden 6a204b1bdd MAINT-5575: Finished converting experience cache to singleton
MAINT-4952: Coverted VMM to coroutines
2015-09-10 16:48:01 -07:00
Rider Linden a471ae72e4 Experience Profile to coroutines and Experience cache. 2015-09-04 13:13:16 -07:00
Rider Linden a75dca5a51 LL_ERRS_IF only seems to work on Microsoft... 2015-09-03 17:37:25 -07:00
Rider Linden 8913ed6692 Changes from code review with Nat 2015-09-03 16:59:00 -07:00
Rider Linden ec998b4c6e Region experience allow/disallow. 2015-09-03 16:14:40 -07:00
Rider Linden c08072a050 Moved group experiences into experience cache. Use coros and new HTTP libs. 2015-09-03 11:10:32 -07:00
Rider Linden 346f885473 Moved find experience into experience cache (moved cache recording into cache and out of UI) changed from responder to coroutine. 2015-09-02 15:16:37 -07:00
Rider Linden 92a8b6690e Use boost assign to initialize default pool sizes. 2015-09-02 13:48:46 -07:00