This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 136160 - Need a mechanisms to notify about fatal errors
Summary: Need a mechanisms to notify about fatal errors
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: XDM (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Samaresh Panda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-30 13:15 UTC by Martin Grebac
Modified: 2008-08-05 19:12 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Grebac 2008-05-30 13:15:04 UTC
Please look at http://www.netbeans.org/issues/show_bug.cgi?id=134382. Currently I can't really fix it, because xdm model
doesn't tell me that something went wrong, or how to revert from such failure.

XDM model should:

 - detect that file to be flushed into is missing
 - recreate the file and flush correctly
 - in case the above failed as well, throw a specific fatal error exception to notify clients that the model is
corrupted and cannot be corrected

Currently none of the above happens, just a NPE is thrown:

java.lang.NullPointerException
org.netbeans.modules.xml.xdm.XDMModel.flushDocument(XDMModel.java:880)
org.netbeans.modules.xml.xdm.XDMModel.flush(XDMModel.java:145)
org.netbeans.modules.xml.xdm.xam.XDMAccess.flush(XDMAccess.java:110)
org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:326)
org.netbeans.modules.xml.xam.AbstractModel.endTransaction(AbstractModel.java:313)

which doesn't help.
Comment 1 Samaresh Panda 2008-08-05 19:12:40 UTC
I looked at issue 134382 and it sounded stupid for someone to go outside the IDE and delete the file you're working
with. Now from API stand-point, I do agree that flush needs to throw exception similar to sync. Which means API change.
This will be treated as an enhancement for post 6.5.