Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Mar 29, 2019
1 parent 0fe739d commit 8944465
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
8 changes: 8 additions & 0 deletions src/server/services/wms/qgswmsparameters.h
Expand Up @@ -283,6 +283,10 @@ namespace QgsWms
*/
void raiseError() const;

/**
* Returns the name of the parameter.
* \since QGIS 3.8
*/
QString name() const;

/**
Expand Down Expand Up @@ -352,6 +356,10 @@ namespace QgsWms

virtual ~QgsWmsParameters() = default;

/**
* Returns the parameter corresponding to \a name.
* \since QGIS 3.8
*/
QgsWmsParameter operator[]( QgsWmsParameter::Name name ) const;

/**
Expand Down
31 changes: 22 additions & 9 deletions src/server/services/wms/qgswmsserviceexception.h
Expand Up @@ -31,13 +31,6 @@ namespace QgsWms
* \ingroup server
* \class QgsWms::QgsServiceException
* \brief Exception class for WMS service exceptions.
*
* The most important codes are:
* * "InvalidFormat"
* * "Invalid CRS"
* * "LayerNotDefined" / "StyleNotDefined"
* * "OperationNotSupported"
*
* \since QGIS 3.0
*/
class QgsServiceException : public QgsOgcServiceException
Expand Down Expand Up @@ -87,10 +80,24 @@ namespace QgsWms
: QgsOgcServiceException( code, message, QString(), responseCode, QStringLiteral( "1.3.0" ) )
{}

/**
* Constructor for QgsServiceException (empty locator attribute).
* \param code Error code
* \param message Exception message to return to the client
* \param responseCode HTTP error code
* \since QGIS 3.8
*/
QgsServiceException( ExceptionCode code, const QString &message, int responseCode )
: QgsServiceException( formatCode( code ), message, QString(), responseCode )
{}

/**
* Constructor for QgsServiceException (empty locator attribute).
* \param code Error code
* \param parameter The WMS parameter on which an error has been detected
* \param responseCode HTTP error code
* \since QGIS 3.8
*/
QgsServiceException( ExceptionCode code, const QgsWmsParameter &parameter, int responseCode )
: QgsServiceException( formatCode( code ), formatMessage( code, parameter ), QString(), responseCode )
{}
Expand Down Expand Up @@ -213,14 +220,20 @@ namespace QgsWms

/**
* Constructor for QgsBadRequestException (HTTP error code 400).
* \param code Error code name
* \param code Error code
* \param message Exception message to return to the client
* \param locator Locator attribute according to OGC specifications
* \since QGIS 3.8
*/
QgsBadRequestException( ExceptionCode code, const QString &message )
: QgsServiceException( code, message, 400 )
{}

/**
* Constructor for QgsBadRequestException (HTTP error code 400).
* \param code Error code
* \param parameter The WMS parameter on which an error has been detected
* \since QGIS 3.8
*/
QgsBadRequestException( ExceptionCode code, const QgsWmsParameter &parameter )
: QgsServiceException( code, parameter, 400 )
{}
Expand Down

0 comments on commit 8944465

Please sign in to comment.