diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-09-26 21:58:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-09-27 09:50:31 +0200 |
commit | 960252e129bb72e10790672a5650c0ce24e0f1e0 (patch) | |
tree | 2fbd8842a2dd3c1aa88656a83ccd975419985e74 /io | |
parent | e0ce9ec1a543d5cbb91d061db067847052bf9c7e (diff) |
improve some exception messages
Change-Id: Ifc5d940fbf77ae13071c299fb6168bdc55dc5c95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103493
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'io')
-rw-r--r-- | io/source/TextInputStream/TextInputStream.cxx | 4 | ||||
-rw-r--r-- | io/source/acceptor/acc_pipe.cxx | 6 | ||||
-rw-r--r-- | io/source/connector/ctr_pipe.cxx | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/io/source/TextInputStream/TextInputStream.cxx b/io/source/TextInputStream/TextInputStream.cxx index 0c40aaa5935c..644db6fb3177 100644 --- a/io/source/TextInputStream/TextInputStream.cxx +++ b/io/source/TextInputStream/TextInputStream.cxx @@ -314,12 +314,12 @@ sal_Int32 OTextInputStream::implReadNext() } catch( NotConnectedException& ) { - throw IOException(); + throw IOException("Not connected"); //throw IOException( L"OTextInputStream::implReadString failed" ); } catch( BufferSizeExceededException& ) { - throw IOException(); + throw IOException("Buffer size exceeded"); } } diff --git a/io/source/acceptor/acc_pipe.cxx b/io/source/acceptor/acc_pipe.cxx index b06b0aa678bc..69f1cad79206 100644 --- a/io/source/acceptor/acc_pipe.cxx +++ b/io/source/acceptor/acc_pipe.cxx @@ -73,7 +73,7 @@ namespace io_acceptor { if( m_nStatus ) { - throw IOException(); + throw IOException("pipe already closed"); } if( aReadBytes.getLength() < nBytesToRead ) { @@ -93,11 +93,11 @@ namespace io_acceptor { if( m_nStatus ) { - throw IOException(); + throw IOException("pipe already closed"); } if( m_pipe.write( seq.getConstArray() , seq.getLength() ) != seq.getLength() ) { - throw IOException(); + throw IOException("short write"); } } diff --git a/io/source/connector/ctr_pipe.cxx b/io/source/connector/ctr_pipe.cxx index 8d66dea7b901..5ee0b70bc970 100644 --- a/io/source/connector/ctr_pipe.cxx +++ b/io/source/connector/ctr_pipe.cxx @@ -51,7 +51,7 @@ namespace stoc_connector { { if( m_nStatus ) { - throw IOException(); + throw IOException("pipe already closed"); } if( aReadBytes.getLength() != nBytesToRead ) { @@ -65,11 +65,11 @@ namespace stoc_connector { { if( m_nStatus ) { - throw IOException(); + throw IOException("pipe already closed"); } if( m_pipe.write( seq.getConstArray() , seq.getLength() ) != seq.getLength() ) { - throw IOException(); + throw IOException("short write"); } } |