Checking in the first stab at error propagation from the expat parser to the content sink. The flow of control is as follows. The tokenizer creates an error token (CErrorToken) when an error occurs in expat and pushes it onto the token dequeue. The DTD forwards the contents of the token to the content sink, which creates content objects to show the error.

This commit is contained in:
nisheeth@netscape.com
1999-03-08 17:42:54 +00:00
parent 90af08f56b
commit e0026e8e3c
12 changed files with 216 additions and 54 deletions

View File

@@ -1656,3 +1656,30 @@ PRInt32 CInstructionToken::GetTokenType(void){
return eToken_instruction;
}
CErrorToken::CErrorToken(nsParserError *aError) : CHTMLToken(eHTMLTag_unknown)
{
mError = aError;
}
CErrorToken::~CErrorToken()
{
delete mError;
}
PRInt32 CErrorToken::GetTokenType(void){
return eToken_error;
}
const char* CErrorToken::GetClassName(void){
return "error";
}
void CErrorToken::SetError(nsParserError *aError) {
mError = aError;
}
const nsParserError * CErrorToken::GetError(void)
{
return mError;
}