summaryrefslogtreecommitdiff
path: root/unodevtools/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-04-11 15:39:38 +0200
committerStephan Bergmann <sbergman@redhat.com>2013-04-11 16:11:19 +0200
commit7b3bef772d65f064393a764e1a6ef468dbf1b18d (patch)
treeb76895c7d109e07d08d550e61f27b6cb4cbba2ba /unodevtools/source
parent6e3e6ef7257e93743a72719581ef6fe0016e58e9 (diff)
No need to have uno-skeletonmaker depend on udkapi
...just for RuntimeException, which can be replaced with CannotDumpException. Change-Id: I258f5fe534d589b33e988f7e585168c1bc6990f8
Diffstat (limited to 'unodevtools/source')
-rw-r--r--unodevtools/source/skeletonmaker/skeletonmaker.cxx17
-rw-r--r--unodevtools/source/unodevtools/options.cxx13
2 files changed, 4 insertions, 26 deletions
diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
index 8dd5d638325c..0ef5d2471597 100644
--- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx
+++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx
@@ -21,17 +21,13 @@
#include "codemaker/typemanager.hxx"
#include "sal/main.h"
#include "rtl/process.h"
-#include "rtl/ustrbuf.hxx"
#include "unodevtools/options.hxx"
#include "skeletonjava.hxx"
#include "skeletoncpp.hxx"
-#include "com/sun/star/uno/Reference.hxx"
-
using namespace ::rtl;
using namespace ::skeletonmaker;
using namespace ::unodevtools;
-using namespace ::com::sun::star::uno;
namespace {
@@ -269,12 +265,7 @@ SAL_IMPLEMENT_MAIN()
// else illegal argument
- OUStringBuffer buf( 64 );
- buf.append("unexpected parameter \"");
- buf.append(arg);
- buf.append("\"!");
- throw RuntimeException(buf.makeStringAndClear(),
- css::uno::Reference< XInterface >());
+ throw CannotDumpException("unexpected parameter \"" + arg + "\"!");
}
if ( types.empty() && options.componenttype != 3) {
@@ -331,12 +322,6 @@ SAL_IMPLEMENT_MAIN()
} catch (const CannotDumpException & e) {
std::cout.flush();
std::cerr << "\nError: " << e.getMessage() << std::endl;
- } catch(const Exception& e) {
- std::cout.flush();
- std::cerr
- << "\nError: "
- << OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr()
- << std::endl;
}
return 0;
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index 534e87eeae2b..ec0264635a2b 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -19,14 +19,11 @@
#include <stdio.h>
+#include "codemaker/global.hxx"
#include "rtl/ustring.hxx"
-#include "rtl/ustrbuf.hxx"
#include "rtl/process.h"
-#include "com/sun/star/uno/RuntimeException.hpp"
-
using namespace ::rtl;
-using namespace ::com::sun::star::uno;
namespace unodevtools {
@@ -41,7 +38,6 @@ static void out( const sal_Char * pText )
//-------------------------------------------------------------------------------
sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg)
- throw (RuntimeException)
{
const OUString dash = OUString("-");
if(aArg.indexOf(dash) != 0)
@@ -60,11 +56,8 @@ sal_Bool readOption( OUString * pValue, const sal_Char * pOpt,
if (*pnIndex >= rtl_getAppCommandArgCount() ||
pValue->copy(1).equals(dash))
{
- OUStringBuffer buf( 32 );
- buf.append( "incomplete option \"-" );
- buf.appendAscii( pOpt );
- buf.append( "\" given!" );
- throw RuntimeException( buf.makeStringAndClear(), Reference< XInterface >() );
+ throw CannotDumpException(
+ "incomplete option \"-" + aOpt + "\" given!");
} else {
#if OSL_DEBUG_LEVEL > 1
out( "\n> identified option -" );