-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add server exception base class - Enable per service exception definition - Handle QgsException gracefully (error 500) - Handle OGC exception versioning
- Loading branch information
Showing
30 changed files
with
552 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/*************************************************************************** | ||
qgsserverexception.sip | ||
------------------------ | ||
begin : January 11 2017 | ||
copyright : (C) 2017 by David Marteau | ||
email : david dot marteau at 3liz dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
|
||
/** \ingroup server | ||
* \class QgsServerException | ||
* \brief server Exception base class. | ||
*/ | ||
|
||
class QgsServerException | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsserverexception.h> | ||
%End | ||
public: | ||
QgsServerException( const QString& message, int responseCode = 500 ); | ||
|
||
int responseCode() const; | ||
|
||
virtual QByteArray formatResponse( QString& responseFormat ) const; | ||
}; | ||
|
||
|
||
class QgsOgcServiceException | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsserverexception.h> | ||
%End | ||
public: | ||
QgsOgcServiceException( const QString& code, const QString& message, const QString& locator = QString(), | ||
int responseCode = 200, const QString& version = "1.3.0" ); | ||
|
||
QString message() const; | ||
QString code() const; | ||
QString locator() const; | ||
|
||
virtual QByteArray formatResponse( QString& responseFormat / Out / ) const; | ||
}; | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.