summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/file/FConnection.cxx
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2000-10-30 09:51:47 +0000
committerFrank Schönheit <fs@openoffice.org>2000-10-30 09:51:47 +0000
commited10baaf4d904b53ce416b9a9449727bcf48b59b (patch)
tree1b152a17f38adbabdb0cb3b965ca6f2d64be4dd1 /connectivity/source/drivers/file/FConnection.cxx
parent371060e167ad92eddc7820ec40fb6b0466033972 (diff)
error messsage if the creation of an UCB content fails
Diffstat (limited to 'connectivity/source/drivers/file/FConnection.cxx')
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 7386dce2aa93..d3a57d8c0c65 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FConnection.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: oj $ $Date: 2000-10-30 08:02:15 $
+ * last change: $Author: fs $ $Date: 2000-10-30 10:51:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -193,9 +193,16 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
{
aFile = ::ucb::Content(aFileName,Reference< ::com::sun::star::ucb::XCommandEnvironment >());
}
- catch(::ucb::ContentCreationException&)
+ catch(::ucb::ContentCreationException&e)
{
- throw SQLException();
+ SQLException aError;
+ aError.Message = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unable to create a content for the URL given."));
+ aError.SQLState = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000"));
+ aError.ErrorCode = 0;
+ aError.Context = static_cast< XConnection* >(this);
+ if (e.Message.getLength())
+ aError.NextException <<= SQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCB message: ")) += e.Message, aError.Context, ::rtl::OUString(), 0, Any());
+ throw SQLException(aError);
}
// if (aFileStat.IsKind(FSYS_KIND_WILD))