Bug 19968. Just 'throw' if we can't create an RDF container on the thing.

This commit is contained in:
waterson%netscape.com 1999-11-23 22:59:02 +00:00
Родитель e5cc293e99
Коммит 29ae06a0cd
1 изменённых файлов: 4 добавлений и 11 удалений

Просмотреть файл

@ -146,17 +146,10 @@ RDFContainerImpl::Init(nsIRDFDataSource *aDataSource, nsIRDFResource *aContainer
rv = gRDFContainerUtils->IsContainer(aDataSource, aContainer, &isContainer); rv = gRDFContainerUtils->IsContainer(aDataSource, aContainer, &isContainer);
if (NS_FAILED(rv)) return rv; if (NS_FAILED(rv)) return rv;
if (! isContainer) { // ``throw'' if we can't create a container on the specified
#ifdef DEBUG // datasource/resource combination.
nsCAutoString msg; if (! isContainer)
nsXPIDLCString uri; return NS_ERROR_FAILURE;
aContainer->GetValue(getter_Copies(uri));
msg += uri;
msg += " is not an RDF container";
NS_WARNING((const char*) msg);
#endif
return NS_ERROR_UNEXPECTED;
}
NS_IF_RELEASE(mDataSource); NS_IF_RELEASE(mDataSource);
mDataSource = aDataSource; mDataSource = aDataSource;