diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 14:52:04 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 16:01:44 +0200 |
commit | 4f18490ca6cc84727e953bd2f99d9a92a4cc3710 (patch) | |
tree | f1cfa7f68246d11ae3a285168165be603d753dd2 /connectivity | |
parent | 6435ef9a592e6bfc510bca5a9e061e3dab7fdf58 (diff) |
Clean up warning/info reporting
Change-Id: Ib2a8da9f837b0b91f980aacda9df1c6c5c691eef
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/mork/MNSINIParser.cxx | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/connectivity/source/drivers/mork/MNSINIParser.cxx b/connectivity/source/drivers/mork/MNSINIParser.cxx index c601213bd654..bd7ac6e97d79 100644 --- a/connectivity/source/drivers/mork/MNSINIParser.cxx +++ b/connectivity/source/drivers/mork/MNSINIParser.cxx @@ -23,21 +23,20 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOException ) { OUString iniUrl; - if (osl_File_E_None != osl_getFileURLFromSystemPath(rIniName.pData, &iniUrl.pData)) + oslFileError fileError = osl_getFileURLFromSystemPath( + rIniName.pData, &iniUrl.pData); + if (fileError != osl_File_E_None) + { + SAL_WARN( + "connectivity.mork", + "InitParser, getFileURLFromSystemPath(" << rIniName << "): " + << +fileError); return; + } SAL_INFO("connectivity.mork", "IniParser: " << iniUrl); oslFileHandle handle=NULL; - oslFileError fileError = osl_File_E_INVAL; - try{ - if (!iniUrl.isEmpty()) - fileError = osl_openFile(iniUrl.pData, &handle, osl_File_OpenFlag_Read); - } - catch(const ::com::sun::star::io::IOException&) - { - SAL_WARN("connectivity.mork", "IniParser -- couldn't open file: " << iniUrl); - return; - } + fileError = osl_openFile(iniUrl.pData, &handle, osl_File_OpenFlag_Read); if (osl_File_E_None == fileError) { @@ -85,12 +84,12 @@ IniParser::IniParser(OUString const & rIniName) throw(com::sun::star::io::IOExce } osl_closeFile(handle); } -#if OSL_DEBUG_LEVEL > 0 else { - SAL_WARN("connectivity.mork", "IniParser -- couldn't open file: " << iniUrl); + SAL_INFO( + "connectivity.mork", + "IniParser couldn't open file " << iniUrl << ": " << +fileError); } -#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |