You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/02/15 15:10:37 UTC

svn commit: r1446588 - /openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx

Author: hdu
Date: Fri Feb 15 14:10:36 2013
New Revision: 1446588

URL: http://svn.apache.org/r1446588
Log:
saxparser: failure inducing exceptions are message worthy

Modified:
    openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx

Modified: openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx?rev=1446588&r1=1446587&r2=1446588&view=diff
==============================================================================
--- openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx (original)
+++ openoffice/trunk/main/i18npool/source/localedata/saxparser.cxx Fri Feb 15 14:10:36 2013
@@ -321,8 +321,6 @@ public:
 
 SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 {
-
-
 	if( argc < 6) {
 		printf( "usage : %s <locaLe> <XML inputfile> <destination file> <services.rdb location> <types.rdb location>\n", argv[0] );
 		exit( 1 );
@@ -336,9 +334,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 			::rtl::OUString::createFromAscii(argv[4]),
 			::rtl::OUString::createFromAscii(argv[5]), true );
 	}
-	catch ( Exception& )
+	catch( const Exception& e)
 	{
-		printf( "Exception on createRegistryServiceFactory\n" );
+		const OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8 );
+		printf( "Exception on createRegistryServiceFactory: \"%s\"\n", aMsg.getStr() );
 		exit(1);
 	}
 
@@ -373,10 +372,10 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
 			rParser->parseStream( source );
 		}
 
-		catch( Exception & e )
+		catch( const Exception& e)
 		{
-			OString o1 = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8 );
-			printf( "Exception during parsing : %s\n" ,  o1.getStr() );
+			const OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8 );
+			printf( "Exception during parsing : \"%s\"\n",  aMsg.getStr() );
 			exit(1);
 		}
         nError = pDocHandler->nError;