rsc-no-error-about-unknown-switch
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Thu, 14 Dec 2017 23:29:20 +0000 (23:29 +0000)
committerRene Engelhard <rene@debian.org>
Thu, 14 Dec 2017 23:29:20 +0000 (23:29 +0000)
Gbp-Pq: Name rsc-no-error-about-unknown-switch.diff

rsc/source/parser/erscerr.cxx

index a6dcb46cf22705930da29d77b383458830979d3f..8d22aee80187d02be877c03bade2d3533ead0a8a 100644 (file)
@@ -388,7 +388,7 @@ void RscError::Error( const ERRTYPE& rError, RscTop * pClass,
 void RscError::FatalError( const ERRTYPE& rError, const RscId &aId,
                            const char * pMessage )
 {
-    if( ERR_USAGE != rError.GetError() ){
+    if( ERR_USAGE != rError.GetError() && ERR_UNKNOWNSW != rError.GetError() ){
         nErrors++;
         ErrorFormat( rError, nullptr, aId );
         WriteError( rError, pMessage );
@@ -397,7 +397,8 @@ void RscError::FatalError( const ERRTYPE& rError, const RscId &aId,
     else
         WriteError( rError, pMessage );
 
-    exit( 1 );
+    if( ERR_UNKNOWNSW != rError.GetError() )
+          exit( 1 );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */