From 4f534d633b3cfc3aa768caca51098859d9ffcfef Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Thu, 10 May 2007 09:21:03 +0000 Subject: INTEGRATION: CWS dba23a (1.7.72); FILE MERGED 2007/03/08 09:33:34 fs 1.7.72.1: #i73084# insertHierachyElement: better error handling --- dbaccess/source/ui/dlg/CollectionView.cxx | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'dbaccess/source/ui') diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx index 5fe53ca2a03a..0f201bfe67c9 100644 --- a/dbaccess/source/ui/dlg/CollectionView.cxx +++ b/dbaccess/source/ui/dlg/CollectionView.cxx @@ -4,9 +4,9 @@ * * $RCSfile: CollectionView.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: rt $ $Date: 2007-04-26 07:55:22 $ + * last change: $Author: kz $ $Date: 2007-05-10 10:21:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -53,6 +53,9 @@ #ifndef _COMPHELPER_INTERACTION_HXX_ #include #endif +#ifndef _CPPUHELPER_EXC_HLP_HXX_ +#include +#endif #ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_ #include #endif @@ -98,6 +101,9 @@ #ifndef _COM_SUN_STAR_TASK_INTERACTIONCLASSIFICATION_HPP_ #include #endif +#ifndef _COM_SUN_STAR_SDBC_SQLEXCEPTION_HPP_ +#include +#endif #ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_ #include #endif @@ -107,6 +113,9 @@ #ifndef _OSL_THREAD_H_ #include #endif +#ifndef _DBHELPER_DBEXCEPTION_HXX_ +#include +#endif #define FILEDIALOG_DEF_IMAGEBORDER 10 //......................................................................... @@ -121,6 +130,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::ucb; using namespace ::com::sun::star::task; +using namespace ::com::sun::star::sdbc; using namespace comphelper; // ----------------------------------------------------------------------------- DBG_NAME(OCollectionView) @@ -284,6 +294,10 @@ IMPL_LINK( OCollectionView, NewFolder_Click, PushButton*, EMPTYARG ) if ( dbaui::insertHierachyElement(this,m_xORB,xNameContainer,String(),m_bCreateForm) ) m_aView.Initialize(m_xContent,String()); } + catch( const SQLException& ) + { + showError( ::dbtools::SQLExceptionInfo( ::cppu::getCaughtException() ), this, m_xORB ); + } catch(Exception) { OSL_ENSURE(0,"Exception caught!"); -- cgit