mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-22 00:07:53 -04:00
Convert doxygen \throws to Sphinx :raises: syntax in sipify
This commit is contained in:
parent
9b4cb6f502
commit
dd27f72b0e
@ -115,7 +115,7 @@ Handles the request within its ``context``
|
|||||||
Subclasses must implement this methods, and call validate() to
|
Subclasses must implement this methods, and call validate() to
|
||||||
extract validated parameters from the request.
|
extract validated parameters from the request.
|
||||||
|
|
||||||
\throws QgsServerApiBadRequestError if the method encounters any error
|
:raises QgsServerApiBadRequestError: if the method encounters any error
|
||||||
%End
|
%End
|
||||||
|
|
||||||
virtual QVariantMap values( const QgsServerApiContext &context ) const throw( QgsServerApiBadRequestException );
|
virtual QVariantMap values( const QgsServerApiContext &context ) const throw( QgsServerApiBadRequestException );
|
||||||
@ -137,7 +137,8 @@ the parameters map.
|
|||||||
.. seealso:: :py:func:`path`
|
.. seealso:: :py:func:`path`
|
||||||
|
|
||||||
.. seealso:: :py:func:`parameters`
|
.. seealso:: :py:func:`parameters`
|
||||||
\throws QgsServerApiBadRequestError if validation fails
|
|
||||||
|
:raises QgsServerApiBadRequestError: if validation fails
|
||||||
%End
|
%End
|
||||||
|
|
||||||
QString contentTypeForAccept( const QString &accept ) const;
|
QString contentTypeForAccept( const QString &accept ) const;
|
||||||
@ -202,7 +203,7 @@ The path file extension is examined first and checked for known mime types,
|
|||||||
the "Accept" HTTP header is examined next.
|
the "Accept" HTTP header is examined next.
|
||||||
Fallback to the default content type of the handler if none of the above matches.
|
Fallback to the default content type of the handler if none of the above matches.
|
||||||
|
|
||||||
\throws QgsServerApiBadRequestError if the content type of the request is not compatible with the handler (:py:func:`contentTypes` member)
|
:raises QgsServerApiBadRequestError: if the content type of the request is not compatible with the handler (:py:func:`contentTypes` member)
|
||||||
%End
|
%End
|
||||||
|
|
||||||
static QString parentLink( const QUrl &url, int levels = 1 );
|
static QString parentLink( const QUrl &url, int levels = 1 );
|
||||||
|
@ -169,7 +169,8 @@ Loads the data associated to the parameter converted into an url.
|
|||||||
Raises an exception in case of an invalid parameters.
|
Raises an exception in case of an invalid parameters.
|
||||||
|
|
||||||
:param msg: The message describing the exception
|
:param msg: The message describing the exception
|
||||||
\throws QgsBadRequestException Invalid parameter exception
|
|
||||||
|
:raises QgsBadRequestException: Invalid parameter exception
|
||||||
%End
|
%End
|
||||||
|
|
||||||
QVariant::Type mType;
|
QVariant::Type mType;
|
||||||
@ -216,7 +217,8 @@ Constructor for QgsServerParameter.
|
|||||||
void raiseError() const;
|
void raiseError() const;
|
||||||
%Docstring
|
%Docstring
|
||||||
Raises an error in case of an invalid conversion.
|
Raises an error in case of an invalid conversion.
|
||||||
\throws QgsBadRequestException Invalid parameter exception
|
|
||||||
|
:raises QgsBadRequestException: Invalid parameter exception
|
||||||
%End
|
%End
|
||||||
|
|
||||||
static QString name( const QgsServerParameter::Name name );
|
static QString name( const QgsServerParameter::Name name );
|
||||||
|
@ -74,7 +74,8 @@ Validation steps:
|
|||||||
.. seealso:: :py:func:`setCustomValidator`
|
.. seealso:: :py:func:`setCustomValidator`
|
||||||
|
|
||||||
:return: the parameter value or an invalid QVariant if not found (and not required)
|
:return: the parameter value or an invalid QVariant if not found (and not required)
|
||||||
\throws QgsServerApiBadRequestError if validation fails
|
|
||||||
|
:raises QgsServerApiBadRequestError: if validation fails
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ sub processDoxygenLine {
|
|||||||
|
|
||||||
# if inside multi-line parameter, ensure additional lines are indented
|
# if inside multi-line parameter, ensure additional lines are indented
|
||||||
if ($line ne '') {
|
if ($line ne '') {
|
||||||
if ( $line !~ m/^\s*[\\:]+(param|note|since|return|deprecated|warning)/ ) {
|
if ( $line !~ m/^\s*[\\:]+(param|note|since|return|deprecated|warning|throws)/ ) {
|
||||||
$line = "$INDENT$line";
|
$line = "$INDENT$line";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -299,6 +299,11 @@ sub processDoxygenLine {
|
|||||||
$COMMENT_LAST_LINE_NOTE_WARNING = 1;
|
$COMMENT_LAST_LINE_NOTE_WARNING = 1;
|
||||||
return "\n.. warning::\n\n $1\n";
|
return "\n.. warning::\n\n $1\n";
|
||||||
}
|
}
|
||||||
|
if ( $line =~ m/[\\@]throws (.+?)\b\s*(.*)/ ) {
|
||||||
|
$INDENT = '';
|
||||||
|
$COMMENT_LAST_LINE_NOTE_WARNING = 1;
|
||||||
|
return "\n:raises $1: $2\n";
|
||||||
|
}
|
||||||
|
|
||||||
if ( $line !~ m/^\s*$/ ){
|
if ( $line !~ m/^\s*$/ ){
|
||||||
if ( $COMMENT_LAST_LINE_NOTE_WARNING == 1 ){
|
if ( $COMMENT_LAST_LINE_NOTE_WARNING == 1 ){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user