Skip to content
Permalink
Browse files

raise exceptions instead of fatal errors

  • Loading branch information
alexbruy committed Nov 2, 2020
1 parent d40a7db commit 76c1557e692ef0d3f6c8ecc6f565a49bd3d7eb81
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/analysis/processing/qgsalgorithmdxfexport.cpp
@@ -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;
}

0 comments on commit 76c1557

Please sign in to comment.
You can’t perform that action at this time.