rsc-no-error-about-unknown-switch
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Thu, 27 Jul 2017 23:16:27 +0000 (00:16 +0100)
committerRaspbian forward porter <root@raspbian.org>
Thu, 27 Jul 2017 23:16:27 +0000 (00:16 +0100)
Gbp-Pq: Name rsc-no-error-about-unknown-switch.diff

rsc/source/parser/erscerr.cxx

index ce67dfd9c60bba7d1dafe2f6bca42f173cd16873..3f2af83270837ec0b754dceefe7683df601e419e 100644 (file)
@@ -389,7 +389,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 );
@@ -398,7 +398,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: */