mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	instead of the generic QgsException one Refs warning in https://github.com/qgis/QGIS/issues/55481#issuecomment-1849001802 ``` /tmp/work/geography/qgis/work/qgis-3.28.13/build/python/core/build/_core/sip_corepart0.cpp:38168: warning: exception of type 'QgsProviderConnectionException' will be caught 38168 | catch (QgsProviderConnectionException &sipExceptionRef) | /tmp/work/geography/qgis/work/qgis-3.28.13/build/python/core/build/_core/sip_corepart0.cpp:38158: warning: by earlier handler for 'QgsException' 38158 | catch (QgsException &sipExceptionRef) ```
		
			
				
	
	
		
			79 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
%Exception QgsCsException(SIP_Exception) /PyName=QgsCsException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsCsException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
%Exception QgsProcessingException(SIP_Exception) /PyName=QgsProcessingException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsProcessingException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
%Exception QgsProviderConnectionException(SIP_Exception) /PyName=QgsProviderConnectionException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsProviderConnectionException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
%Exception QgsNotSupportedException(SIP_Exception) /PyName=QgsNotSupportedException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsNotSupportedException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
%Exception QgsSettingsException(SIP_Exception) /PyName=QgsSettingsException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsSettingsException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
// IMPORTANT -- QgsException MUST be last listed, or it will greedily prevent the more
 | 
						|
// specialized exceptions from being raised
 | 
						|
 | 
						|
%Exception QgsException(SIP_Exception) /PyName=QgsException/
 | 
						|
{
 | 
						|
%TypeHeaderCode
 | 
						|
#include <qgsexception.h>
 | 
						|
%End
 | 
						|
%RaiseCode
 | 
						|
  SIP_BLOCK_THREADS
 | 
						|
  PyErr_SetString(sipException_QgsException, sipExceptionRef.what().toUtf8().constData() );
 | 
						|
  SIP_UNBLOCK_THREADS
 | 
						|
%End
 | 
						|
};
 | 
						|
 | 
						|
// IMPORTANT -- QgsException MUST be last listed, or it will greedily prevent the more
 | 
						|
// specialized exceptions from being raised
 | 
						|
 |