Skip to content

Commit

Permalink
Update InvalidFormat exception
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere committed Mar 28, 2019
1 parent daa5e42 commit 37b9499
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsgetlegendgraphics.cpp
Expand Up @@ -66,8 +66,8 @@ namespace QgsWms
saveFormat = "JPEG";
break;
default:
throw QgsServiceException( "InvalidFormat",
QString( "Output format '%1' is not supported in the GetLegendGraphic request" ).arg( format ) );
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
mWmsParameters[QgsWmsParameter::FORMAT] );
break;
}

Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsgetprint.cpp
Expand Up @@ -50,8 +50,8 @@ namespace QgsWms
contentType = QStringLiteral( "application/pdf" );
break;
default:
throw QgsServiceException( QStringLiteral( "InvalidFormat" ),
QString( "Output format %1 is not supported by the GetPrint request" ).arg( wmsParameters.formatAsString() ) );
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
mWmsParameters[QgsWmsParameter::FORMAT] );
break;
}

Expand Down
4 changes: 2 additions & 2 deletions src/server/services/wms/qgswmsutils.cpp
Expand Up @@ -161,8 +161,8 @@ namespace QgsWms
}
else
{
throw QgsServiceException( "InvalidFormat",
QString( "Output format '%1' is not supported in the GetMap request" ).arg( formatStr ) );
throw QgsBadRequestException( QgsServiceException::OGC_INVALID_FORMAT,
mWmsParameters[QgsWmsParameter::FORMAT] );
}
}
} // namespace QgsWms

0 comments on commit 37b9499

Please sign in to comment.