[XForms] xforms-link-exception in model should trigger fatal error dialog. Bug 332604, r=aaronr+me, patch by sspeiche@us.ibm.com

This commit is contained in:
allan%beaufour.dk 2006-04-20 10:18:53 +00:00
parent fe04651c77
commit b5b772146e

View File

@ -1306,6 +1306,8 @@ nsXFormsModelElement::OnError(nsresult aStatus,
{
nsXFormsUtils::ReportError(NS_LITERAL_STRING("schemaLoadError"), mElement);
nsXFormsUtils::DispatchEvent(mElement, eEvent_LinkException);
nsXFormsUtils::HandleFatalError(mElement,
NS_LITERAL_STRING("XFormsLinkException"));
return NS_OK;
}
@ -1418,6 +1420,8 @@ nsXFormsModelElement::InstanceLoadFinished(PRBool aSuccess)
// finish construction, which is wrong.
nsXFormsUtils::ReportError(NS_LITERAL_STRING("instanceLoadError"), mElement);
nsXFormsUtils::DispatchEvent(mElement, eEvent_LinkException);
nsXFormsUtils::HandleFatalError(mElement,
NS_LITERAL_STRING("XFormsLinkException"));
return NS_OK;
}
@ -2465,9 +2469,11 @@ nsXFormsModelElement::HandleLoad(nsIDOMEvent* aEvent)
mSchemaCount++;
}
if (NS_FAILED(rv)) {
// this is a fatal error (XXX)
// this is a fatal error
nsXFormsUtils::ReportError(NS_LITERAL_STRING("schemaLoadError"), mElement);
nsXFormsUtils::DispatchEvent(mElement, eEvent_LinkException);
nsXFormsUtils::HandleFatalError(mElement,
NS_LITERAL_STRING("XFormsLinkException"));
return NS_OK;
}
}