Fix for bug 13565. Removed code that dumps XML error messages to console because error messages now show up inside the browser window.

This commit is contained in:
nisheeth%netscape.com 2000-04-13 04:13:41 +00:00
parent 7e9990507f
commit 8e74f09317
4 changed files with 2 additions and 28 deletions

View File

@ -235,7 +235,7 @@ void nsExpatTokenizer::GetLine(const char* aSourceBuffer, PRUint32 aLength,
{
/* Figure out the line inside aSourceBuffer that contains character specified by aOffset.
Copy it into aLine. */
NS_ASSERTION(aOffset > 0 && aOffset < aLength, "?");
NS_ASSERTION(aOffset >= 0 && aOffset < aLength, "?");
/* Assert that the byteIndex and the length of the buffer is even */
NS_ASSERTION(aOffset % 2 == 0 && aLength % 2 == 0, "?");
PRUnichar* start = (PRUnichar* ) &aSourceBuffer[aOffset]; /* Will try to find the start of the line */

View File

@ -692,19 +692,6 @@ 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

@ -235,7 +235,7 @@ void nsExpatTokenizer::GetLine(const char* aSourceBuffer, PRUint32 aLength,
{
/* Figure out the line inside aSourceBuffer that contains character specified by aOffset.
Copy it into aLine. */
NS_ASSERTION(aOffset > 0 && aOffset < aLength, "?");
NS_ASSERTION(aOffset >= 0 && aOffset < aLength, "?");
/* Assert that the byteIndex and the length of the buffer is even */
NS_ASSERTION(aOffset % 2 == 0 && aLength % 2 == 0, "?");
PRUnichar* start = (PRUnichar* ) &aSourceBuffer[aOffset]; /* Will try to find the start of the line */

View File

@ -692,19 +692,6 @@ 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;
}