Commit Graph

299 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 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
Oz Linden 9be58e915a merge with 4.0.3-release 2016-04-04 15:53:09 -04:00
Drake Arconis d253f48538 Add SSL support to update downloader to enable possibility of secure downloads 2016-02-25 15:02:32 -05:00
Drake Arconis e307a46bdd Update to modern curl progress reporting functionality in the update downloader 2016-02-25 15:01:46 -05:00
Rider Linden 3edc3c5554 CMake fixes for Linux build 2015-12-21 14:26:41 -08:00
Rider Linden b98469bd7d Disable unit test on Linux only 2015-12-18 13:53:03 -08: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 53b947e039 Merge from viewer release. 2015-10-19 12:03:08 -07:00
Rider Linden 29596be514 Test disabling a couple of the display_startup() calls as an experiment. 2015-09-22 13:01:30 -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 a8ab084678 Tweek to naming postEventAndSuspend -> postAndSuspend 2015-09-18 11:54:38 -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 d3c2ab5817 Be sure the correct include is included. 2015-08-19 12:39:51 -07:00
Rider Linden c4267e0284 Swap BOOST_COROUTINE and BOOST_CONTEXT 2015-08-19 10:30:41 -07:00
Nat Goodspeed 6ff09fa393 MAINT-5506: Fix library delimiters for LL_TEST_ADDITIONAL_LIBRARIES.
Recent cmake versions are unhappy with embedding spaces in the
LL_TEST_ADDITIONAL_LIBRARIES property. Using semicolons to delimit libraries
seems to make it better.
2015-08-18 17:37:49 -04:00
Rider Linden 05d90b5679 More libraries... 2015-08-18 12:55:13 -07:00
andreykproductengine 222a8b101c MAINT-5174 Add Check for Updates feature to Help menu 2015-07-15 18:54:30 +03:00
Nat Goodspeed 8e6bea61a9 MAINT-5351: llupdaterservice_test now needs Boost System library. 2015-07-12 10:57:13 -04:00
Nat Goodspeed 391d9a367b Merge restore of more selfless changes 2015-07-10 19:34:20 -04:00
Nat Goodspeed efa9a0f99c Backed out changeset bab1000e1b2d: restore 'selfless' changes 2015-07-10 19:30:10 -04:00
Nat Goodspeed 9809f59fa9 Merge restore of selfless changes 2015-07-10 16:54:05 -04:00
Nat Goodspeed 6f9f89ee71 Backed out changeset 6e1fa9518747: reapply 'selfless' changes 2015-07-10 16:47:07 -04:00
Rider Linden 247eb0c9c3 Backout selfles merge 738255dbbfd679d9e615baab3398e5e345bbb3c5 2015-07-07 19:41:27 +01:00
Rider Linden 4c1d47d4ae Backed out selfless merge 2015-07-07 19:31:34 +01:00
andreykproductengine 9790ec0c75 MAINT-5174 Add Check for Updates feature to Help menu 2015-07-07 18:51:19 +03:00
Nat Goodspeed f90023fc0b MAINT-5357: Introduce and populate llcoro:: namespace.
To date, the coroutine helper functions in lleventcoro.h have been in the
global namespace. Migrate them into llcoro namespace, and fix references.
Specifically, LLVoidListener => llcoro::VoidListener, and voidlistener(),
postAndWait(), both waitForEventOn(), postAndWait2(), errorException() and
errorLog() have been moved into llcoro.
Also migrate new LLCoros::get_self() and Suspending to llcoro:: namespace.
While at it, I realized that -- having converted several lleventcoro.h
functions from templates (for arbitrary 'self' parameter type) to ordinary
functions, having moved them from lleventcoro.h to lleventcoro.cpp, we can now
migrate their helpers from lleventcoro.h to lleventcoro.cpp as well. This
eliminates the need for the LLEventDetail namespace; the relevant helpers are
now in an anonymous namespace in the .cpp file: listenerNameForCoro(),
storeToLLSDPath(), WaitForEventOnHelper and wfeoh().
2015-07-02 17:00:32 -04:00
Nat Goodspeed b262ded7e0 MAINT-5351: Remove 'self' parameter from coroutine functions.
lleventcoro_test.cpp runs clean (as modified for new API), and all the rest
builds clean, but the resulting viewer is as yet untested.
2015-07-01 18:33:29 -04:00
Rider Linden 4a4470af32 Coding policy fixes 2015-06-17 13:53:28 -07:00
Rider Linden 0d3fb07bfa Remove vestigial httpclient.h include from files that no longer need it. 2015-06-03 16:04:40 -07:00
Rider Linden a4741cecb2 Changed Avatar picker to use coroutine for find.
Fixed a stray reference (&) on URL that had crept into some coroutine definitions.
2015-05-18 16:18:07 -07:00
Rider Linden 46a86ddb7a Remove an unused variable from the updatechecker. 2015-05-18 13:39:48 -07:00
Rider Linden 225612ea77 Updater to coroutines. 2015-05-18 11:48:50 -07:00
Oz Linden 5c6cf3e7fb restore the ll[io]fstream because we need them as wrappers on Windows for wide char paths; on other platforms they are now just typedefs to the std classes 2015-04-10 11:02:37 -04:00
Oz Linden 8b42c7898e replace llifstream and llofstream with std::ifstream and std::ofstream respectively 2015-04-07 17:59:28 -04:00
Oz Linden 3a57b18896 convert llifstream and llofstream to std::ifstream and std::ofstream respectively 2015-04-07 17:28:05 -04:00
Nat Goodspeed 897ad8842c Reorder Boost libraries for Linux linker 2015-01-19 14:38:03 +00:00
callum_linden 745151936e Update to build on Xcode 6.0 (fix unit tests): fix up Boost linker errors 2014-10-22 10:09:24 -07:00
Monty Brandenberg 903729d5c9 Merge. Refresh from viewer-release after 3.7.9 release. 2014-06-16 16:41:52 -04:00
Monty Brandenberg 060c728970 Merge. Pull in viewer-release after release of 3.7.8 2014-05-22 22:08:54 +00:00
Brad Payne (Vir Linden) 7b9708a2e3 sunshine-external merge WIP 2014-05-13 10:02:26 -04:00
Monty Brandenberg 1422f89612 Linux: Finish new Boost dependencies to get Linux building again. 2014-04-04 21:59:15 +00:00
Monty Brandenberg 469438707d Library updates and switch to 3d-llqtwebkit2 build products.
SDL to 1.2.15, c-ares to latest 1.10.0 build, Boost to 1.55.0
with coroutine updates/fixes, curl to 7.34.0, libpng to 1.6.8,
openssl to 1.0.1e, zlib to latest 1.2.8 build, llqtwebkit
built from 4.7.1 sources refactored and tested in 3p-llqtwebkit2
repository.

Windows is functional with a good number of warning messages
at runtime from libpng and KDU.  MoaP/slplugin functioning.
2014-04-04 16:30:50 -04:00
Brad Payne (Vir Linden) e896c19cc1 merge 2013-12-10 10:12:01 -05:00
Richard Linden 24b7fd1c7f merge with release 2013-12-09 11:55:02 -08:00
Brad Payne (Vir Linden) 744cf6be8d merge 2013-12-05 10:39:35 -05:00