summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-10-09 19:23:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-10-09 21:02:11 +0200
commitf58ee783eebf74108c1c1dd5f24e6abaa19c4f09 (patch)
tree34b7ebcb305f4d5b2e54f428fb7acf0e3156d36d
parent669655d146ea87db2df28125b02bcfdfe4ef61d7 (diff)
Improve ErrorCodeIOException messages
...and clean up some includes. Change-Id: Ia5843cd38f967722d7173a6c87fba26064e3ffd6
-rw-r--r--basic/source/uno/scriptcont.cxx15
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx1
-rw-r--r--include/sfx2/sfxuno.hxx1
-rw-r--r--include/tools/diagnose_ex.h1
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx1
-rw-r--r--sfx2/source/doc/DocumentMetadataAccess.cxx6
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx6
-rw-r--r--sfx2/source/doc/guisaveas.cxx66
-rw-r--r--sfx2/source/doc/objserv.cxx7
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx43
-rw-r--r--sfx2/source/view/ipclient.cxx1
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx1
-rw-r--r--tools/source/debug/debug.cxx1
13 files changed, 94 insertions, 56 deletions
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 0104fd8e715e..65e9d02b83b8 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -980,7 +980,11 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
{
sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL;
delete pStream;
- throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), nError );
+ throw task::ErrorCodeIOException(
+ ("utl::UcbStreamHelper::CreateStream failed for \""
+ + aCodeStreamName + "\": 0x"
+ + OUString::number(nError, 16)),
+ uno::Reference< uno::XInterface >(), nError);
}
/*sal_Bool bRet = */pMod->LoadBinaryData( *pStream );
@@ -1094,9 +1098,12 @@ sal_Bool SfxScriptLibraryContainer::implLoadPasswordLibrary
{
sal_Int32 nError = pStream ? pStream->GetError() : ERRCODE_IO_GENERAL;
delete pStream;
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- nError );
+ throw task::ErrorCodeIOException(
+ ("utl::UcbStreamHelper::CreateStream failed"
+ " for code.bin: 0x"
+ + OUString::number(nError, 16)),
+ uno::Reference< uno::XInterface >(),
+ nError);
}
/*sal_Bool bRet = */pMod->LoadBinaryData( *pStream );
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 613ee0a1f10d..d3b4e47839b0 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -47,7 +47,6 @@
#include <com/sun/star/script/provider/theMasterScriptProviderFactory.hpp>
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
-#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
diff --git a/include/sfx2/sfxuno.hxx b/include/sfx2/sfxuno.hxx
index 2f69e6e791ca..70029b1d9228 100644
--- a/include/sfx2/sfxuno.hxx
+++ b/include/sfx2/sfxuno.hxx
@@ -28,7 +28,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
-#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/uno/Type.h>
diff --git a/include/tools/diagnose_ex.h b/include/tools/diagnose_ex.h
index 50a400d39313..445ea7e6120e 100644
--- a/include/tools/diagnose_ex.h
+++ b/include/tools/diagnose_ex.h
@@ -34,7 +34,6 @@
#if OSL_DEBUG_LEVEL > 0
#include <com/sun/star/configuration/CorruptedConfigurationException.hpp>
- #include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <cppuhelper/exc_hlp.hxx>
#include <osl/diagnose.h>
#include <osl/thread.h>
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index d266504d5075..680172fec877 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -71,7 +71,6 @@
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/table/ShadowFormat.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
-#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
#include <com/sun/star/ui/UIConfigurationManager.hpp>
diff --git a/sfx2/source/doc/DocumentMetadataAccess.cxx b/sfx2/source/doc/DocumentMetadataAccess.cxx
index 623aa843ea91..e3d71f9cc823 100644
--- a/sfx2/source/doc/DocumentMetadataAccess.cxx
+++ b/sfx2/source/doc/DocumentMetadataAccess.cxx
@@ -1382,8 +1382,10 @@ throw (uno::RuntimeException, lang::IllegalArgumentException,
if ( nError == ERRCODE_NONE ) {
nError = ERRCODE_IO_GENERAL;
}
- task::ErrorCodeIOException ex( OUString(),
- uno::Reference< uno::XInterface >(), nError);
+ task::ErrorCodeIOException ex(
+ ("DocumentMetadataAccess::storeMetadataToMedium Commit failed: "
+ "0x" + OUString::number(nError, 16)),
+ uno::Reference< uno::XInterface >(), nError);
throw lang::WrappedTargetException(OUString(), *this,
uno::makeAny(ex));
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 4e89b6ac1625..5bdcc7ec9a70 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -2118,8 +2118,10 @@ SfxDocumentMetaData::storeToMedium(const OUString & URL,
nError = ERRCODE_IO_GENERAL;
}
- throw css::task::ErrorCodeIOException( OUString(),
- css::uno::Reference< css::uno::XInterface >(), nError);
+ throw css::task::ErrorCodeIOException(
+ ("SfxDocumentMetaData::storeToMedium <" + URL + "> Commit failed: "
+ "0x" + OUString::number(nError, 16)),
+ css::uno::Reference< css::uno::XInterface >(), nError);
}
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index f8f880540b15..79af8ed1b006 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/document/XExporter.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <com/sun/star/document/XDocumentProperties.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
@@ -152,9 +153,10 @@ static sal_uInt8 getStoreModeFromSlotName( const OUString& aSlotName )
else if ( aSlotName == "SaveAs" )
nResult = SAVEAS_REQUESTED;
else
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_INVALIDPARAMETER );
+ throw task::ErrorCodeIOException(
+ ("getStoreModeFromSlotName(\"" + aSlotName
+ + "): ERRCODE_IO_INVALIDPARAMETER"),
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER );
return nResult;
}
@@ -609,9 +611,11 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
}
else
{
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ ("ModelData_Impl::ExecuteFilterDialog_Impl:"
+ " ERRCODE_IO_ABORT"),
+ uno::Reference< uno::XInterface >(),
+ ERRCODE_IO_ABORT);
}
}
}
@@ -621,12 +625,13 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
}
}
}
- catch( const container::NoSuchElementException& )
+ catch( const container::NoSuchElementException& e )
{
// the filter name is unknown
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_INVALIDPARAMETER );
+ throw task::ErrorCodeIOException(
+ ("ModelData_Impl::ExecuteFilterDialog_Impl: NoSuchElementException"
+ " \"" + e.Message + "\": ERRCODE_IO_ABORT"),
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER);
}
catch( const task::ErrorCodeIOException& )
{
@@ -870,9 +875,10 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
// the file name must be specified if overwrite option is set
if ( aOverwriteIter != GetMediaDescr().end() )
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_INVALIDPARAMETER );
+ throw task::ErrorCodeIOException(
+ "ModelData_Impl::OutputFileDialog: ERRCODE_IO_INVALIDPARAMETER",
+ uno::Reference< uno::XInterface >(),
+ ERRCODE_IO_INVALIDPARAMETER);
// no target file name is specified
// we need to show the file dialog
@@ -1053,7 +1059,9 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
OUString aStringTypeFN;
if ( pFileDlg->Execute( pDialogParams, aStringTypeFN ) != ERRCODE_NONE )
{
- throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "ModelData_Impl::OutputFileDialog: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
}
OUString aFilterName = aStringTypeFN;
@@ -1378,7 +1386,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
// if saving is not acceptable the warning must be shown even in case of SaveAs operation
if ( ( nStoreMode & SAVEAS_REQUESTED ) && aModelData.CheckSaveAcceptable( STATUS_SAVEAS ) == STATUS_NO_ACTION )
- throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
}
else if ( nStoreMode & SAVE_REQUESTED )
{
@@ -1386,7 +1396,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
nStatusSave = aModelData.CheckSaveAcceptable( STATUS_SAVE );
if ( nStatusSave == STATUS_NO_ACTION )
- throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
else if ( nStatusSave == STATUS_SAVE )
{
// check whether it is possible to use save operation
@@ -1395,7 +1407,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
if ( nStatusSave == STATUS_NO_ACTION )
{
- throw task::ErrorCodeIOException( OUString(), uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
}
else if ( nStatusSave != STATUS_SAVE )
{
@@ -1417,9 +1431,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
if ( QueryBox( NULL, SfxResId( RID_XMLSEC_QUERY_LOSINGSIGNATURE ) ).Execute() != RET_YES )
{
// the user has decided not to store the document
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
}
}
}
@@ -1456,9 +1470,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
DBG_ASSERT( aFilterProps.getLength(), "No filter for storing!\n" );
if ( !aFilterProps.getLength() )
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_INVALIDPARAMETER );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_INVALIDPARAMETER",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER);
::comphelper::SequenceAsHashMap aFilterPropsHM( aFilterProps );
OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
@@ -1607,9 +1621,9 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel
else
{
DBG_ASSERT( sal_False, "This code must be unreachable!\n" );
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_INVALIDPARAMETER );
+ throw task::ErrorCodeIOException(
+ "SfxStoringHelper::GUIStoreModel: ERRCODE_IO_INVALIDPARAMETER",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_INVALIDPARAMETER);
}
::comphelper::SequenceAsHashMap::const_iterator aIter =
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 3a2ce2e7eb20..2fe263e2357f 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -30,6 +30,7 @@
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/document/XCmisDocument.hpp>
#include <com/sun/star/document/XExporter.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
@@ -692,9 +693,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
else
{
// the user has decided not to store the document
- throw task::ErrorCodeIOException( OUString(),
- uno::Reference< uno::XInterface >(),
- ERRCODE_IO_ABORT );
+ throw task::ErrorCodeIOException(
+ "SfxObjectShell::ExecFile_Impl: ERRCODE_IO_ABORT",
+ uno::Reference< uno::XInterface >(), ERRCODE_IO_ABORT);
}
// merge aDispatchArgs to the request
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index d7776594321d..e7888a4c6069 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -22,6 +22,7 @@
#include <sfx2/sfxbasemodel.hxx>
#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/ErrorCodeRequest.hpp>
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <com/sun/star/view/XPrintJobListener.hpp>
@@ -1660,7 +1661,9 @@ void SAL_CALL SfxBaseModel::storeSelf( const Sequence< beans::PropertyValue >
// write the contents of the logger to the file
SFX_APP()->NotifyEvent( SfxEventHint( SFX_EVENT_SAVEDOCFAILED, GlobalEventConfig::GetEventName(STR_EVENT_SAVEDOCFAILED), m_pData->m_pObjectShell ) );
- throw task::ErrorCodeIOException( OUString(), Reference< XInterface >(), nErrCode );
+ throw task::ErrorCodeIOException(
+ "SfxBaseModel::storeSelf: 0x" + OUString::number(nErrCode, 16),
+ Reference< XInterface >(), nErrCode);
}
}
@@ -1807,7 +1810,9 @@ void SAL_CALL SfxBaseModel::initNew()
m_pData->m_pObjectShell->ResetError();
if ( !bRes )
- throw task::ErrorCodeIOException( OUString(), Reference< XInterface >(), nErrCode );
+ throw task::ErrorCodeIOException(
+ "SfxBaseModel::initNew: 0x" + OUString::number(nErrCode, 16),
+ Reference< XInterface >(), nErrCode);
}
}
@@ -2733,9 +2738,10 @@ void SfxBaseModel::handleLoadError( sal_uInt32 nError, SfxMedium* pMedium )
if ( !bWarning ) // #i30711# don't abort loading if it's only a warning
{
- throw task::ErrorCodeIOException( OUString(),
- Reference< XInterface >(),
- nError ? nError : ERRCODE_IO_CANTREAD );
+ nError = nError ? nError : ERRCODE_IO_CANTREAD;
+ throw task::ErrorCodeIOException(
+ "SfxBaseModel::handleLoadError: 0x" + OUString::number(nError, 16),
+ Reference< XInterface >(), nError);
}
}
@@ -3158,7 +3164,10 @@ void SfxBaseModel::impl_store( const OUString& sURL
SFX_APP()->NotifyEvent( SfxEventHint( bSaveTo ? SFX_EVENT_SAVETODOCFAILED : SFX_EVENT_SAVEASDOCFAILED, GlobalEventConfig::GetEventName( bSaveTo ? STR_EVENT_SAVETODOCFAILED : STR_EVENT_SAVEASDOCFAILED),
m_pData->m_pObjectShell ) );
- throw task::ErrorCodeIOException( OUString(), Reference< XInterface >(), nErrCode );
+ throw task::ErrorCodeIOException(
+ ("SfxBaseModel::impl_store <" + sURL + "> failed: 0x"
+ + OUString::number(nErrCode, 16)),
+ Reference< XInterface >(), nErrCode);
}
}
}
@@ -3781,9 +3790,10 @@ void SAL_CALL SfxBaseModel::loadFromStorage( const Reference< embed::XStorage >&
if ( !m_pData->m_pObjectShell->DoLoad(pMedium) )
{
sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
- throw task::ErrorCodeIOException( OUString(),
- Reference< XInterface >(),
- nError ? nError : ERRCODE_IO_CANTREAD );
+ nError = nError ? nError : ERRCODE_IO_CANTREAD;
+ throw task::ErrorCodeIOException(
+ "SfxBaseModel::loadFromStorage: 0x" + OUString::number(nError, 16),
+ Reference< XInterface >(), nError);
}
loadCmisProperties( );
}
@@ -3844,9 +3854,10 @@ void SAL_CALL SfxBaseModel::storeToStorage( const Reference< embed::XStorage >&
// the warnings are currently not transported
if ( !bSuccess )
{
- throw task::ErrorCodeIOException( OUString(),
- Reference< XInterface >(),
- nError ? nError : ERRCODE_IO_GENERAL );
+ nError = nError ? nError : ERRCODE_IO_GENERAL;
+ throw task::ErrorCodeIOException(
+ "SfxBaseModel::storeToStorage: 0x" + OUString::number(nError, 16),
+ Reference< XInterface >(), nError);
}
}
@@ -3868,9 +3879,11 @@ void SAL_CALL SfxBaseModel::switchToStorage( const Reference< embed::XStorage >&
if ( !m_pData->m_pObjectShell->SwitchPersistance( xStorage ) )
{
sal_uInt32 nError = m_pData->m_pObjectShell->GetErrorCode();
- throw task::ErrorCodeIOException( OUString(),
- Reference< XInterface >(),
- nError ? nError : ERRCODE_IO_GENERAL );
+ nError = nError ? nError : ERRCODE_IO_GENERAL;
+ throw task::ErrorCodeIOException(
+ ("SfxBaseModel::switchToStorage: 0x"
+ + OUString::number(nError, 16)),
+ Reference< XInterface >(), nError);
}
else
{
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index d3c5989fac83..19d61a51304f 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <com/sun/star/task/StatusIndicatorFactory.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 57aff1283d6b..232607183515 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -53,6 +53,7 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdb/XColumn.hpp>
+#include <com/sun/star/task/ErrorCodeIOException.hpp>
#include <dbmgr.hxx>
#include <swunohelper.hxx>
#include <osl/mutex.hxx>
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index a9a713b6e81c..ceea7803ee7e 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -34,6 +34,7 @@
#include <windows.h>
#endif
+#include "com/sun/star/task/ErrorCodeIOException.hpp"
#include <tools/debug.hxx>
#include <rtl/string.h>
#include <sal/log.hxx>