(*) if we are already throwing a Wrapped*Exception, get the
exception using cppu::getCaughtexception.
(*) when catching and then immediately throwing UNO exceptions,
use cppu::getCaughtException to prevent exception slicing
(*) if we are going to catch an exception and then
immediately throw a RuntimeException, rather throw a
WrappedTargetRuntimeException and preserve the original exception information.
Reviewed-on: https://gerrit.libreoffice.org/54692Tested-by: Jenkins <email@example.com>
Reviewed-by: Noel Grandin <firstname.lastname@example.org>