summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-30 17:32:50 +0200
committerJulien Nabet <serval2412@yahoo.fr>2017-10-01 18:17:11 +0200
commit20bae560c05a3df6e7ce8d4b869ed00f951c1e59 (patch)
tree968607d7c4f33c26302bee6731858c1ed64aa622 /connectivity
parentebeff35a0305683574373b75c7b0e5797749fe3e (diff)
throw more useful uno::Exception's
if we're going to throw the base class of the exception hierarchy, we can at least put a useful message in there to make the source a little bit easier to locate. Change-Id: I2f3106c99ba25125eacef8fa77e2f3a2c89f2566 Reviewed-on: https://gerrit.libreoffice.org/42968 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/CommonTools.cxx2
-rw-r--r--connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/ado/AResultSet.cxx2
-rw-r--r--connectivity/source/drivers/ado/ATable.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/ResultSet.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabResultSet.cxx2
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx2
10 files changed, 10 insertions, 10 deletions
diff --git a/connectivity/source/commontools/CommonTools.cxx b/connectivity/source/commontools/CommonTools.cxx
index 2afca36d0604..3bfef6fd3d03 100644
--- a/connectivity/source/commontools/CommonTools.cxx
+++ b/connectivity/source/commontools/CommonTools.cxx
@@ -134,7 +134,7 @@ namespace connectivity
Any uaJVM = xVM->getJavaVM( processID );
sal_Int64 nTemp;
if (!(uaJVM >>= nTemp)) {
- throw Exception(); // -5
+ throw Exception("cannot get result for getJavaVM", nullptr); // -5
}
aRet = reinterpret_cast<jvmaccess::VirtualMachine *>(
static_cast<sal_IntPtr>(nTemp));
diff --git a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
index df4d7e274681..fa7657095050 100644
--- a/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/ado/ADatabaseMetaDataResultSet.cxx
@@ -747,7 +747,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_RESULTSETTYPE:
case PROPERTY_ID_FETCHDIRECTION:
case PROPERTY_ID_FETCHSIZE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
default:
OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
diff --git a/connectivity/source/drivers/ado/AResultSet.cxx b/connectivity/source/drivers/ado/AResultSet.cxx
index 1e2c5b76e44f..17c6f25810c4 100644
--- a/connectivity/source/drivers/ado/AResultSet.cxx
+++ b/connectivity/source/drivers/ado/AResultSet.cxx
@@ -1097,7 +1097,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& r
case PROPERTY_ID_CURSORNAME:
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
break;
case PROPERTY_ID_FETCHDIRECTION:
setFetchDirection(getINT32(rValue));
diff --git a/connectivity/source/drivers/ado/ATable.cxx b/connectivity/source/drivers/ado/ATable.cxx
index 567f660bd72e..dd84f1f67753 100644
--- a/connectivity/source/drivers/ado/ATable.cxx
+++ b/connectivity/source/drivers/ado/ATable.cxx
@@ -215,7 +215,7 @@ void OAdoTable::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rV
break;
default:
- throw Exception();
+ throw Exception("unknown prop " + OUString::number(nHandle), nullptr);
}
}
OTable_TYPEDEF::setFastPropertyValue_NoBroadcast(nHandle,rValue);
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index a5574288a248..48e03e90f9b8 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2308,7 +2308,7 @@ namespace
Sequence< Any > aValues;
aContent.executeCommand( "setPropertyValues",makeAny(aProps) ) >>= aValues;
if(aValues.getLength() && aValues[0].hasValue())
- throw Exception();
+ throw Exception("setPropertyValues returned non-zero", nullptr);
}
catch(const Exception&)
{
diff --git a/connectivity/source/drivers/jdbc/ResultSet.cxx b/connectivity/source/drivers/jdbc/ResultSet.cxx
index 94af450a1c2e..d0db5f52078d 100644
--- a/connectivity/source/drivers/jdbc/ResultSet.cxx
+++ b/connectivity/source/drivers/jdbc/ResultSet.cxx
@@ -933,7 +933,7 @@ void java_sql_ResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_CURSORNAME:
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
- throw css::uno::Exception();
+ throw css::uno::Exception("cannot set prop " + OUString::number(nHandle), nullptr);
case PROPERTY_ID_FETCHDIRECTION:
setFetchDirection(comphelper::getINT32(rValue));
break;
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx
index eaf74c2776b0..71d4dbfb05a8 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -1040,7 +1040,7 @@ void MacabResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_CURSORNAME:
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
break;
case PROPERTY_ID_FETCHDIRECTION:
break;
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index c510fff3255f..c461d4e09a54 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -579,7 +579,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_ISBOOKMARKABLE:
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
case PROPERTY_ID_FETCHDIRECTION:
break;
case PROPERTY_ID_FETCHSIZE:
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index a5ee72690dde..370b26f60abb 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -758,7 +758,7 @@ void ODatabaseMetaDataResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHa
case PROPERTY_ID_RESULTSETTYPE:
case PROPERTY_ID_FETCHDIRECTION:
case PROPERTY_ID_FETCHSIZE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
default:
OSL_FAIL("setFastPropertyValue_NoBroadcast: Illegal handle value!");
}
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index b9089952dd6a..51c2e88ae2cf 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1456,7 +1456,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast(
case PROPERTY_ID_CURSORNAME:
case PROPERTY_ID_RESULTSETCONCURRENCY:
case PROPERTY_ID_RESULTSETTYPE:
- throw Exception();
+ throw Exception("cannot set prop " + OUString::number(nHandle), nullptr);
case PROPERTY_ID_FETCHDIRECTION:
setFetchDirection(getINT32(rValue));
break;