Im trying to catch exception in OpenLayers using vector layers in conjunction with http protocol, its possible to intercept an ServiceException from geoserver ... it will be great to display some kinda of error message when it happens.
here my snippet:
var layer = new OpenLayers.Layer.Vector("Foo", {
projection: new OpenLayers.Projection("EPSG:4326"),
strategies: [new OpenLayers.Strategy.Fixed()],
reportError: true,
protocol: new OpenLayers.Protocol.HTTP({
url: "/geoserver/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ns:foo&outputFormat=json&viewparams=foo:var;",
format: new OpenLayers.Format.GeoJSON()
})
});
ideas ??
thks !