coverity#983635 Uncaught exception
Change-Id: I4be3600af6ee97ba9f962edf9723c04d89b161e4
This commit is contained in:
@@ -29,6 +29,7 @@ namespace sdbtools
|
|||||||
using ::com::sun::star::uno::Reference;
|
using ::com::sun::star::uno::Reference;
|
||||||
using ::com::sun::star::sdbc::XConnection;
|
using ::com::sun::star::sdbc::XConnection;
|
||||||
using ::com::sun::star::lang::NullPointerException;
|
using ::com::sun::star::lang::NullPointerException;
|
||||||
|
using ::com::sun::star::sdbc::SQLException;
|
||||||
using ::com::sun::star::uno::RuntimeException;
|
using ::com::sun::star::uno::RuntimeException;
|
||||||
using ::com::sun::star::uno::XComponentContext;
|
using ::com::sun::star::uno::XComponentContext;
|
||||||
|
|
||||||
@@ -51,7 +52,7 @@ namespace sdbtools
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException, std::exception)
|
sal_Bool SAL_CALL DataSourceMetaData::supportsQueriesInFrom( ) throw (RuntimeException, SQLException, std::exception)
|
||||||
{
|
{
|
||||||
EntryGuard aGuard( *this );
|
EntryGuard aGuard( *this );
|
||||||
::dbtools::DatabaseMetaData aMeta( getConnection() );
|
::dbtools::DatabaseMetaData aMeta( getConnection() );
|
||||||
|
@@ -58,7 +58,7 @@ namespace sdbtools
|
|||||||
);
|
);
|
||||||
|
|
||||||
// XDataSourceMetaData
|
// XDataSourceMetaData
|
||||||
virtual sal_Bool SAL_CALL supportsQueriesInFrom( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
virtual sal_Bool SAL_CALL supportsQueriesInFrom() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~DataSourceMetaData();
|
virtual ~DataSourceMetaData();
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#define __com_sun_star_sdb_tools_XDataSourceMetaData_idl__
|
#define __com_sun_star_sdb_tools_XDataSourceMetaData_idl__
|
||||||
|
|
||||||
#include <com/sun/star/uno/XInterface.idl>
|
#include <com/sun/star/uno/XInterface.idl>
|
||||||
|
#include <com/sun/star/sdbc/SQLException.idl>
|
||||||
|
|
||||||
module com { module sun { module star { module sdb { module tools {
|
module com { module sun { module star { module sdb { module tools {
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ interface XDataSourceMetaData
|
|||||||
/** determines whether the data source supports queries in the <code>FROM</code>
|
/** determines whether the data source supports queries in the <code>FROM</code>
|
||||||
part of a <code>SELECT</code> statement.
|
part of a <code>SELECT</code> statement.
|
||||||
*/
|
*/
|
||||||
boolean supportsQueriesInFrom( );
|
boolean supportsQueriesInFrom() raises ( com::sun::star::sdbc::SQLException );
|
||||||
};
|
};
|
||||||
|
|
||||||
}; }; }; }; };
|
}; }; }; }; };
|
||||||
|
@@ -762,14 +762,12 @@ public class DBMetaData
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsQueriesInFrom() throws SQLException
|
||||||
|
|
||||||
public boolean supportsQueriesInFrom()
|
|
||||||
{
|
{
|
||||||
return m_connectionTools.getDataSourceMetaData().supportsQueriesInFrom();
|
return m_connectionTools.getDataSourceMetaData().supportsQueriesInFrom();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String suggestName( final int i_objectType, final String i_baseName ) throws IllegalArgumentException
|
public String suggestName( final int i_objectType, final String i_baseName ) throws IllegalArgumentException, SQLException
|
||||||
{
|
{
|
||||||
return m_connectionTools.getObjectNames().suggestName( i_objectType, i_baseName );
|
return m_connectionTools.getObjectNames().suggestName( i_objectType, i_baseName );
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,7 @@ import com.sun.star.awt.XRadioButton;
|
|||||||
import com.sun.star.awt.XTextComponent;
|
import com.sun.star.awt.XTextComponent;
|
||||||
import com.sun.star.lang.IllegalArgumentException;
|
import com.sun.star.lang.IllegalArgumentException;
|
||||||
import com.sun.star.sdb.CommandType;
|
import com.sun.star.sdb.CommandType;
|
||||||
|
import com.sun.star.sdbc.SQLException;
|
||||||
import com.sun.star.uno.AnyConverter;
|
import com.sun.star.uno.AnyConverter;
|
||||||
import com.sun.star.wizards.common.HelpIds;
|
import com.sun.star.wizards.common.HelpIds;
|
||||||
import com.sun.star.wizards.common.Helper;
|
import com.sun.star.wizards.common.Helper;
|
||||||
@@ -147,6 +148,11 @@ public class Finalizer
|
|||||||
exception.printStackTrace(System.err);
|
exception.printStackTrace(System.err);
|
||||||
return PropertyNames.EMPTY_STRING;
|
return PropertyNames.EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
catch (SQLException exception)
|
||||||
|
{
|
||||||
|
exception.printStackTrace(System.err);
|
||||||
|
return PropertyNames.EMPTY_STRING;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTitle()
|
private String getTitle()
|
||||||
|
Reference in New Issue
Block a user