summaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-28 12:50:02 +0200
committerNoel Grandin <noel@peralex.com>2014-05-29 09:01:40 +0200
commitebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (patch)
tree2ce9446ed312a1a7aed53183b19ecc9fefabea8a /io
parentf0ae48b684e89acd7088c31a8feff5fc03d51105 (diff)
remove more unnecesary OUString constructor use
when throwing exceptions Change-Id: I6edfb6b6745499f802b0e3c0e096a36fb7c32aac
Diffstat (limited to 'io')
-rw-r--r--io/source/stm/omark.cxx10
-rw-r--r--io/source/stm/opipe.cxx18
-rw-r--r--io/source/stm/opump.cxx10
3 files changed, 17 insertions, 21 deletions
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index bd026b498255..138117a96023 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -631,7 +631,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
}
else {
throw NotConnectedException(
- OUString("MarkableInputStream::readBytes NotConnectedException") ,
+ "MarkableInputStream::readBytes NotConnectedException",
*this );
}
return nBytesRead;
@@ -693,7 +693,7 @@ sal_Int32 OMarkableInputStream::readSomeBytes(Sequence< sal_Int8 >& aData, sal_I
else
{
throw NotConnectedException(
- OUString("MarkableInputStream::readSomeBytes NotConnectedException") ,
+ "MarkableInputStream::readSomeBytes NotConnectedException",
*this );
}
return nBytesRead;
@@ -709,7 +709,7 @@ void OMarkableInputStream::skipBytes(sal_Int32 nBytesToSkip)
{
if ( nBytesToSkip < 0 )
throw BufferSizeExceededException(
- OUString("precondition not met: XInputStream::skipBytes: non-negative integer required!"),
+ "precondition not met: XInputStream::skipBytes: non-negative integer required!",
*this
);
@@ -728,7 +728,7 @@ sal_Int32 OMarkableInputStream::available(void) throw (NotConnectedException, Ru
else
{
throw NotConnectedException(
- OUString("MarkableInputStream::available NotConnectedException") ,
+ "MarkableInputStream::available NotConnectedException",
*this );
}
@@ -754,7 +754,7 @@ void OMarkableInputStream::closeInput(void) throw (NotConnectedException, Runtim
}
else {
throw NotConnectedException(
- OUString("MarkableInputStream::closeInput NotConnectedException") ,
+ "MarkableInputStream::closeInput NotConnectedException",
*this );
}
}
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index a6871c43abce..7d4f9159004b 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -153,7 +153,7 @@ sal_Int32 OPipeImpl::readBytes(Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRe
if( m_bInputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::readBytes NotConnectedException"),
+ "Pipe::readBytes NotConnectedException",
*this );
}
sal_Int32 nOccupiedBufferLen = m_pFIFO->getSize();
@@ -192,7 +192,7 @@ sal_Int32 OPipeImpl::readSomeBytes(Sequence< sal_Int8 >& aData, sal_Int32 nMaxBy
if( m_bInputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::readSomeBytes NotConnectedException"),
+ "Pipe::readSomeBytes NotConnectedException",
*this );
}
if( m_pFIFO->getSize() )
@@ -224,7 +224,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
if( m_bInputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::skipBytes NotConnectedException"),
+ "Pipe::skipBytes NotConnectedException",
*this );
}
@@ -233,7 +233,7 @@ void OPipeImpl::skipBytes(sal_Int32 nBytesToSkip)
> std::numeric_limits< sal_Int32 >::max() - m_nBytesToSkip) )
{
throw BufferSizeExceededException(
- OUString("Pipe::skipBytes BufferSizeExceededException"),
+ "Pipe::skipBytes BufferSizeExceededException",
*this );
}
m_nBytesToSkip += nBytesToSkip;
@@ -252,7 +252,7 @@ sal_Int32 OPipeImpl::available(void)
if( m_bInputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::available NotConnectedException"),
+ "Pipe::available NotConnectedException",
*this );
}
return m_pFIFO->getSize();
@@ -287,14 +287,14 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
if( m_bOutputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::writeBytes NotConnectedException (outputstream)"),
+ "Pipe::writeBytes NotConnectedException (outputstream)",
*this );
}
if( m_bInputStreamClosed )
{
throw NotConnectedException(
- OUString("Pipe::writeBytes NotConnectedException (inputstream)"),
+ "Pipe::writeBytes NotConnectedException (inputstream)",
*this );
}
@@ -325,13 +325,13 @@ void OPipeImpl::writeBytes(const Sequence< sal_Int8 >& aData)
catch ( I_FIFO_OutOfBoundsException & )
{
throw BufferSizeExceededException(
- OUString("Pipe::writeBytes BufferSizeExceededException"),
+ "Pipe::writeBytes BufferSizeExceededException",
*this );
}
catch ( I_FIFO_OutOfMemoryException & )
{
throw BufferSizeExceededException(
- OUString("Pipe::writeBytes BufferSizeExceededException"),
+ "Pipe::writeBytes BufferSizeExceededException",
*this );
}
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index d5c010e66356..51b4bb83226d 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -262,18 +262,14 @@ void Pump::run()
if( ! rInput.is() )
{
- NotConnectedException exception(
- OUString("no input stream set") , Reference<XInterface>((OWeakObject*)this) );
- throw exception;
+ throw NotConnectedException( "no input stream set", (OWeakObject*)this );
}
Sequence< sal_Int8 > aData;
while( rInput->readSomeBytes( aData, 65536 ) )
{
if( ! rOutput.is() )
{
- NotConnectedException exception(
- OUString("no output stream set") , Reference<XInterface>( (OWeakObject*)this) );
- throw exception;
+ throw NotConnectedException( "no output stream set", (OWeakObject*)this );
}
rOutput->writeBytes( aData );
osl_yieldThread();
@@ -372,7 +368,7 @@ void Pump::start() throw( RuntimeException, std::exception )
else
{
throw RuntimeException(
- OUString("Pump::start Couldn't create worker thread"),
+ "Pump::start Couldn't create worker thread",
*this);
}
}