Skip to content

Commit

Permalink
raise exceptions instead of fatal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 2, 2020
1 parent d40a7db commit 76c1557
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/analysis/processing/qgsalgorithmdxfexport.cpp
Expand Up @@ -118,15 +118,15 @@ QVariantMap QgsDxfExportAlgorithm::processAlgorithm( const QVariantMap &paramete
break;

case QgsDxfExport::ExportResult::DeviceNotWritableError:
feedback->reportError( QObject::tr( "DXF export failed, device is not writable" ), true );
throw QgsProcessingException( QObject::tr( "DXF export failed, device is not writable" ) );
break;

case QgsDxfExport::ExportResult::InvalidDeviceError:
feedback->reportError( QObject::tr( "DXF export failed, the device is invalid" ), true );
throw QgsProcessingException( QObject::tr( "DXF export failed, the device is invalid" ) );
break;

case QgsDxfExport::ExportResult::EmptyExtentError:
feedback->reportError( QObject::tr( "DXF export failed, the extent could not be determined" ), true );
throw QgsProcessingException( QObject::tr( "DXF export failed, the extent could not be determined" ) );
break;
}

Expand Down

0 comments on commit 76c1557

Please sign in to comment.