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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user