rsc-no-error-about-unknown-switch
authorDebian LibreOffice Maintainers <debian-openoffice@lists.debian.org>
Tue, 6 Aug 2019 18:20:01 +0000 (19:20 +0100)
committerRene Engelhard <rene@debian.org>
Tue, 6 Aug 2019 18:20:01 +0000 (19:20 +0100)
Gbp-Pq: Name rsc-no-error-about-unknown-switch.diff

rsc/source/parser/erscerr.cxx

index 761dedbfaa9b59056bcb638c0ab8479747cc785f..6d3324aec740bab498e276162d3965b73efe4bbf 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 ){
+    if( ERR_USAGE != rError && ERR_UNKNOWNSW != rError ){
         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 )
+          exit( 1 );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */