More useful error message when an XML bindings file fails to load. r=waterson, sr=hyatt

This commit is contained in:
sfraser%netscape.com 2000-12-14 02:32:26 +00:00
Родитель 1bd04c173d
Коммит e0b33dce98
2 изменённых файлов: 20 добавлений и 4 удалений

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

@ -299,8 +299,16 @@ nsXBLStreamListener::OnStopRequest(nsIChannel* aChannel, nsISupports* aCtxt, nsr
rv = mInner->OnStopRequest(aChannel, aCtxt, aStatus, aStatusArg); rv = mInner->OnStopRequest(aChannel, aCtxt, aStatus, aStatusArg);
} }
if (NS_FAILED(rv) || NS_FAILED(aStatus)) { if (NS_FAILED(rv) || NS_FAILED(aStatus))
NS_WARNING("Failed to load XBL document!!!!!!!!!!!!!\n"); {
if (aChannel)
{
nsCOMPtr<nsIURI> channelURI;
aChannel->GetURI(getter_AddRefs(channelURI));
nsXPIDLCString str;
channelURI->GetSpec(getter_Copies(str));
printf("Failed to load XBL document %s\n", (const char*)str);
}
PRUint32 count = mBindingRequests.Count(); PRUint32 count = mBindingRequests.Count();
for (PRUint32 i = 0; i < count; i++) { for (PRUint32 i = 0; i < count; i++) {

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

@ -299,8 +299,16 @@ nsXBLStreamListener::OnStopRequest(nsIChannel* aChannel, nsISupports* aCtxt, nsr
rv = mInner->OnStopRequest(aChannel, aCtxt, aStatus, aStatusArg); rv = mInner->OnStopRequest(aChannel, aCtxt, aStatus, aStatusArg);
} }
if (NS_FAILED(rv) || NS_FAILED(aStatus)) { if (NS_FAILED(rv) || NS_FAILED(aStatus))
NS_WARNING("Failed to load XBL document!!!!!!!!!!!!!\n"); {
if (aChannel)
{
nsCOMPtr<nsIURI> channelURI;
aChannel->GetURI(getter_AddRefs(channelURI));
nsXPIDLCString str;
channelURI->GetSpec(getter_Copies(str));
printf("Failed to load XBL document %s\n", (const char*)str);
}
PRUint32 count = mBindingRequests.Count(); PRUint32 count = mBindingRequests.Count();
for (PRUint32 i = 0; i < count; i++) { for (PRUint32 i = 0; i < count; i++) {