Closed Bug 332604 Opened 18 years ago Closed 18 years ago

xforms-link-exceptions in model should trigger fatal error dialog

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: msterlin)

References

()

Details

(Keywords: fixed1.8.0.5, fixed1.8.1)

Attachments

(3 files, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060403 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060403 Firefox/1.6a1

According to the spec http://www.w3.org/TR/xforms/index-all.html#evt-modelConstruct
in the list, the xforms-link-exception should be dispatched.

Current behaviour is to present dialog, per bug 329520.  Perhaps better to just dispatch the event and allow form author to handler?

This fails test suite case: 4.2.1.b2

The xforms-link-exception doesn't surface for external instance docs (test case 4.2.1.c3) either.  Should there be a separate bug or handled by this one?

Reproducible: Always

Steps to Reproduce:
test case 4.2.1.c3 (incase they are related, enough)
I see xforms-link-exception messages generated by both testcases.  Is that what this bug is about?  Or is the bug because we are not generating the fatal error dialog?
Assignee: aaronr → msterlin
(In reply to comment #3)
> I see xforms-link-exception messages generated by both testcases.  Is that what
> this bug is about?  Or is the bug because we are not generating the fatal error
> dialog?
> 
I get the exceptions when the files are hosted off of bugzilla.mozilla.org.
Though, when they are hosted off of the filesystem...I don't get the exception but I do get Javascript console entries.

Could it be related to bug 329106 (help @src only works with absolute URLs)?
(In reply to comment #4)
> (In reply to comment #3)
> > I see xforms-link-exception messages generated by both testcases.  Is that what
> > this bug is about?  Or is the bug because we are not generating the fatal error
> > dialog?
> > 
> I get the exceptions when the files are hosted off of bugzilla.mozilla.org.
> Though, when they are hosted off of the filesystem...I don't get the exception
> but I do get Javascript console entries.
> 
> Could it be related to bug 329106 (help @src only works with absolute URLs)?
> 


The fact that the messages aren't popping up when running locally is because of bug 315712.  We can still use this bug to fix the fact that we need to be consistent with our use of the HandleFatalError dialog and the xforms-link-exception.  i.e. the first testcase shows the fatal error dialog while the second one doesn't.
(In reply to comment #5)
> The fact that the messages aren't popping up when running locally is because of
> bug 315712.  We can still use this bug to fix the fact that we need to be
> consistent with our use of the HandleFatalError dialog and the
> xforms-link-exception.  i.e. the first testcase shows the fatal error dialog
> while the second one doesn't.

So which should it be?  I suggest that it just shows in JS console and not a fatal error dialog.  As it gives the flexibility to the form author to decide on how to handle the error (either by displaying a message or ???).
(In reply to comment #6)
> (In reply to comment #5)
> > The fact that the messages aren't popping up when running locally is because of
> > bug 315712.  We can still use this bug to fix the fact that we need to be
> > consistent with our use of the HandleFatalError dialog and the
> > xforms-link-exception.  i.e. the first testcase shows the fatal error dialog
> > while the second one doesn't.
> 
> So which should it be?  I suggest that it just shows in JS console and not a
> fatal error dialog.  As it gives the flexibility to the form author to decide
> on how to handle the error (either by displaying a message or ???).
> 

I think that we need to be consistent and if we generate a xforms fatal error that we report it in the JS Console and with the HandleFatalError dialog.  We are, at some point, going to provide the user a preference so that the fatal error dialog can be turned into a message bar kind of like the 'plugin missing' message bar that can appear at the top of the page or the user can turn off the dialog completely.
Attachment #217512 - Flags: review?(aaronr)
Comment on attachment 217512 [details] [diff] [review]
FatalError dialog when instance cannot be loaded

Your code looks fine.  But while you are in nsXFormsModelElement.cpp, could you add HandleFatalError for the other xforms-link-exceptions in this file too, please?  I know it is out of the scope of this very specific bug, but if we are doing the fatal error popup for some link exceptions, might as well finish the collection (unless they are guarenteed to be in the same codepath).  Thanks.

removing the review request while awaiting new patch.
Attachment #217512 - Flags: review?(aaronr)
Attachment #217512 - Attachment is obsolete: true
Attachment #218055 - Flags: review?(aaronr)
Comment on attachment 218055 [details] [diff] [review]
Fatal Error dialog for all xforms-link-exceptions

Only change that I can think of making is having "XFormsLinkException" declared once to save space.

r=me
Attachment #218055 - Flags: review?(aaronr) → review+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #218055 - Flags: review?(allan)
OS: Windows XP → All
Hardware: PC → All
Summary: Schema load errors should generate: xforms-link-exception → xforms-link-exception should trigger fatal error dialog
Attachment #218055 - Flags: review?(allan) → review+
Summary: xforms-link-exception should trigger fatal error dialog → xforms-link-exceptions in model should trigger fatal error dialog
Fixed on trunk
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
(In reply to comment #10)
> Created an attachment (id=218055) [edit]
> Fatal Error dialog for all xforms-link-exceptions

Argh, I gave credit to sspeiche, and not you, in the checkin comment. Sorry for that :(
Keywords: fixed1.8.1
Keywords: fixed1.8.0.5
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: