diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-08-01 06:16:43 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-08-01 06:16:43 +0000 |
commit | e28a6090f89f5cce7c5b6ac5ea886c7fdcfe0bee (patch) | |
tree | 61a17020fad755eb075eb6f6a3f95e7ecff73d61 /connectivity/source/drivers/flat/EDriver.cxx | |
parent | 660e86f7355d88a585e024f1e76ac3ae3f96e6be (diff) |
#101764# check if url is correct
Diffstat (limited to 'connectivity/source/drivers/flat/EDriver.cxx')
-rw-r--r-- | connectivity/source/drivers/flat/EDriver.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/connectivity/source/drivers/flat/EDriver.cxx b/connectivity/source/drivers/flat/EDriver.cxx index 276c44da0de1..5712a5b4b44c 100644 --- a/connectivity/source/drivers/flat/EDriver.cxx +++ b/connectivity/source/drivers/flat/EDriver.cxx @@ -2,9 +2,9 @@ * * $RCSfile: EDriver.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: fs $ $Date: 2001-06-14 09:15:20 $ + * last change: $Author: oj $ $Date: 2002-08-01 07:15:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,6 +68,9 @@ #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_ #include <com/sun/star/lang/DisposedException.hpp> #endif +#ifndef _DBHELPER_DBEXCEPTION_HXX_ +#include "connectivity/dbexception.hxx" +#endif using namespace connectivity::flat; using namespace connectivity::file; @@ -101,7 +104,10 @@ Reference< XConnection > SAL_CALL ODriver::connect( const ::rtl::OUString& url, { ::osl::MutexGuard aGuard( m_aMutex ); if (ODriver_BASE::rBHelper.bDisposed) - throw DisposedException(); + throw DisposedException(); + + if ( ! acceptsURL(url) ) + ::dbtools::throwGenericSQLException(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid URL!")) ,*this); OFlatConnection* pCon = new OFlatConnection(this); pCon->construct(url,info); |