summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2017-08-02 11:28:39 +0300
committerTor Lillqvist <tml@collabora.com>2017-08-02 11:30:53 +0300
commit13cadf3fe38daa0b4cfddcfa68ec8631bc85f44a (patch)
treea5d03a269c6048e7ecee042e5f7debdfcde2f9c1
parentconnectivity: partially merge OWriterTable and OCalcTable (diff)
downloadcore-13cadf3fe38daa0b4cfddcfa68ec8631bc85f44a.tar.gz
core-13cadf3fe38daa0b4cfddcfa68ec8631bc85f44a.zip
If we are going to warn about an "invalid" URL, at least tell what it is
As such the code handles it perfectly fine, and returns an error from the function, but. Change-Id: I356b8140381d3ccd21ff0a7f5c666552571b12f4
-rw-r--r--sal/osl/unx/file_misc.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 28f8edc04b59..8ee95ca2f484 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -347,8 +347,9 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory pDirectory,
oslFileError SAL_CALL osl_getDirectoryItem(rtl_uString* ustrFileURL, oslDirectoryItem* pItem)
{
- SAL_WARN_IF((!ustrFileURL) || (ustrFileURL->length == 0), "sal.file", "Invalid file URL");
- SAL_WARN_IF(!pItem, "sal.file", "pItem is nullptr");
+ SAL_WARN_IF((!ustrFileURL) || (ustrFileURL->length == 0), "sal.file",
+ "Invalid file URL " << (ustrFileURL ? ("'" + OUString(ustrFileURL) + "'") : OUString("(null)")));
+ SAL_WARN_IF(!pItem, "sal.file", "pItem is null");
rtl_uString* ustrSystemPath = nullptr;
oslFileError osl_error = osl_File_E_INVAL;