Back out earlier fix to bug 13565. I shouldn't remove the code that dumps XML error messages to the console because the browser window is not going to be around all time, for example, in the case of the profile manager window.

This commit is contained in:
nisheeth%netscape.com 2000-04-13 04:43:37 +00:00
parent 8e74f09317
commit 0675773d3a
2 changed files with 26 additions and 0 deletions

View File

@ -692,6 +692,19 @@ nsresult CWellFormedDTD::HandleErrorToken(CToken* aToken) {
const nsParserError* error = errTok->GetError();
result=(mSink)? mSink->NotifyError(error):NS_OK;
// Output the error to the console
if (error) {
char* temp;
cout << "XML Error in file '" << (temp = mFilename.ToNewCString()) << "', ";
Recycle(temp);
cout << "Line Number: " << error->lineNumber << ", ";
cout << "Col Number: " << error->colNumber << ", ";
cout << "Description: " << (temp = error->description.ToNewCString()) << "\n";
Recycle(temp);
cout << "Source Line: " << (temp = error->sourceLine.ToNewCString()) << "\n";
Recycle(temp);
}
return result;
}

View File

@ -692,6 +692,19 @@ nsresult CWellFormedDTD::HandleErrorToken(CToken* aToken) {
const nsParserError* error = errTok->GetError();
result=(mSink)? mSink->NotifyError(error):NS_OK;
// Output the error to the console
if (error) {
char* temp;
cout << "XML Error in file '" << (temp = mFilename.ToNewCString()) << "', ";
Recycle(temp);
cout << "Line Number: " << error->lineNumber << ", ";
cout << "Col Number: " << error->colNumber << ", ";
cout << "Description: " << (temp = error->description.ToNewCString()) << "\n";
Recycle(temp);
cout << "Source Line: " << (temp = error->sourceLine.ToNewCString()) << "\n";
Recycle(temp);
}
return result;
}