diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-01-27 22:51:45 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-01-27 23:21:43 +0100 |
commit | cb64711136fff661f60d679db1e391866cc6fe10 (patch) | |
tree | a20bd51b7403699acdfae425514434b5c45209a1 /connectivity | |
parent | c1503da35d8879366da13258837cf0084a536809 (diff) |
Don't use OSL_LOG_PREFIX when throwing exceptions in non-debug builds.
Using OSL_LOG_PREFIX in the exceptions is not a good idea; it blows the size
of the string literals tremendously - full build path for every line that uses
that, including the line.
Let's not remove it for good, but hide it for non-debug builds
(OSL_DEBUG_LEVEL == 0) so that anybody who would like to use this during
debugging could still do (but I doubt it has any value for anybody).
Change-Id: Icc8db95ae0862671a206e681f92c60cdf51ffc32
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/jdbc/InputStream.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/connectivity/source/drivers/jdbc/InputStream.cxx b/connectivity/source/drivers/jdbc/InputStream.cxx index f72cbb763d8a..810a1aee9896 100644 --- a/connectivity/source/drivers/jdbc/InputStream.cxx +++ b/connectivity/source/drivers/jdbc/InputStream.cxx @@ -23,6 +23,13 @@ #include <string.h> using namespace connectivity; + +#if OSL_DEBUG_LEVEL > 0 +#define THROW_WHERE SAL_WHERE +#else +#define THROW_WHERE "" +#endif + //************************************************************** //************ Class: java.io.InputStream //************************************************************** @@ -72,7 +79,7 @@ void SAL_CALL java_io_InputStream::closeInput( ) throw(::com::sun::star::io::No sal_Int32 SAL_CALL java_io_InputStream::readBytes( ::com::sun::star::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) throw(::com::sun::star::io::NotConnectedException, ::com::sun::star::io::BufferSizeExceededException, ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException) { if (nBytesToRead < 0) - throw ::com::sun::star::io::BufferSizeExceededException( OUString( OSL_LOG_PREFIX ), *this ); + throw ::com::sun::star::io::BufferSizeExceededException( OUString(THROW_WHERE), *this ); jint out(0); SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!"); |