Skip to content
Permalink
Browse files

Update InvalidFormat exception

  • Loading branch information
pblottiere committed Mar 28, 2019
1 parent daa5e42 commit 37b9499fc70763efe842a28520901a0c72470e3a
@@ -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;
}

@@ -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;
}

@@ -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.
You can’t perform that action at this time.