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.

View | Details | Raw Unified | Return to bug 35067
Collapse All | Expand All

(-)ant/freeform/src/org/netbeans/modules/ant/freeform/Actions.java (-1 / +1 lines)
Lines 274-280 Link Here
274
            try {
274
            try {
275
                pattern = Pattern.compile(text);
275
                pattern = Pattern.compile(text);
276
            } catch (PatternSyntaxException e) {
276
            } catch (PatternSyntaxException e) {
277
                org.netbeans.modules.ant.freeform.Util.err.annotate(e, ErrorManager.UNKNOWN, "From <pattern> in " + FileUtil.getFileDisplayName(project.getProjectDirectory().getFileObject(AntProjectHelper.PROJECT_XML_PATH)), null, null, null); // NOI18N
277
                org.netbeans.modules.ant.freeform.Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "From <pattern> in " + FileUtil.getFileDisplayName(project.getProjectDirectory().getFileObject(AntProjectHelper.PROJECT_XML_PATH)), null, null, null); // NOI18N
278
                org.netbeans.modules.ant.freeform.Util.err.notify(e);
278
                org.netbeans.modules.ant.freeform.Util.err.notify(e);
279
                return Collections.EMPTY_MAP;
279
                return Collections.EMPTY_MAP;
280
            }
280
            }
(-)ant/project/src/org/netbeans/modules/project/ant/Util.java (-1 / +1 lines)
Lines 122-128 Link Here
122
        public ErrHandler() {}
122
        public ErrHandler() {}
123
        
123
        
124
        private void annotate(SAXParseException exception) throws SAXException {
124
        private void annotate(SAXParseException exception) throws SAXException {
125
            ErrorManager.getDefault().annotate(exception, ErrorManager.UNKNOWN,
125
            ErrorManager.getDefault().annotate(exception, ErrorManager.DangerousUnknownConstant,
126
                "Occurred at: " + exception.getSystemId() + ":" + exception.getLineNumber(), // NOI18N
126
                "Occurred at: " + exception.getSystemId() + ":" + exception.getLineNumber(), // NOI18N
127
                null, null, null);
127
                null, null, null);
128
        }
128
        }
(-)ant/project/src/org/netbeans/spi/project/support/ant/AntProjectHelper.java (-4 / +4 lines)
Lines 308-314 Link Here
308
                                    maybeCallPendingHook();
308
                                    maybeCallPendingHook();
309
                                } catch (IOException e) {
309
                                } catch (IOException e) {
310
                                    // Oh well.
310
                                    // Oh well.
311
                                    ErrorManager.getDefault().notify(e);
311
                                    ErrorManager.getDefault().dangerousNotify(e);
312
                                    reload();
312
                                    reload();
313
                                } finally {
313
                                } finally {
314
                                    writingXML = false;
314
                                    writingXML = false;
Lines 318-324 Link Here
318
                                reload();
318
                                reload();
319
                            }
319
                            }
320
                            public void error(IOException e) {
320
                            public void error(IOException e) {
321
                                ErrorManager.getDefault().notify(e);
321
                                ErrorManager.getDefault().dangerousNotify(e);
322
                                reload();
322
                                reload();
323
                            }
323
                            }
324
                            private void reload() {
324
                            private void reload() {
Lines 445-451 Link Here
445
                        }
445
                        }
446
                    } catch (RuntimeException e) {
446
                    } catch (RuntimeException e) {
447
                        // Don't prevent other listeners from being notified.
447
                        // Don't prevent other listeners from being notified.
448
                        ErrorManager.getDefault().notify(e);
448
                        ErrorManager.getDefault().dangerousNotify(e);
449
                    }
449
                    }
450
                }
450
                }
451
                return null;
451
                return null;
Lines 578-584 Link Here
578
                });
578
                });
579
            } catch (MutexException e) {
579
            } catch (MutexException e) {
580
                // XXX mark project modified again??
580
                // XXX mark project modified again??
581
                ErrorManager.getDefault().notify(e);
581
                ErrorManager.getDefault().dangerousNotify(e);
582
            } finally {
582
            } finally {
583
                pendingHook = null;
583
                pendingHook = null;
584
            }
584
            }
(-)ant/project/src/org/netbeans/spi/project/support/ant/GeneratedFilesHelper.java (-4 / +4 lines)
Lines 331-354 Link Here
331
                                                    try {
331
                                                    try {
332
                                                        body.run();
332
                                                        body.run();
333
                                                    } catch (IOException e) {
333
                                                    } catch (IOException e) {
334
                                                        ErrorManager.getDefault().notify(e);
334
                                                        ErrorManager.getDefault().dangerousNotify(e);
335
                                                    }
335
                                                    }
336
                                                }
336
                                                }
337
                                                public void denied() {}
337
                                                public void denied() {}
338
                                                public void error(IOException e) {
338
                                                public void error(IOException e) {
339
                                                    ErrorManager.getDefault().notify(e);
339
                                                    ErrorManager.getDefault().dangerousNotify(e);
340
                                                }
340
                                                }
341
                                            });
341
                                            });
342
                                        } catch (IOException e) {
342
                                        } catch (IOException e) {
343
                                            // Oh well.
343
                                            // Oh well.
344
                                            ErrorManager.getDefault().notify(e);
344
                                            ErrorManager.getDefault().dangerousNotify(e);
345
                                        }
345
                                        }
346
                                    }
346
                                    }
347
                                    public void denied() {
347
                                    public void denied() {
348
                                        // OK, skip it.
348
                                        // OK, skip it.
349
                                    }
349
                                    }
350
                                    public void error(IOException e) {
350
                                    public void error(IOException e) {
351
                                        ErrorManager.getDefault().notify(e);
351
                                        ErrorManager.getDefault().dangerousNotify(e);
352
                                        // Never mind.
352
                                        // Never mind.
353
                                    }
353
                                    }
354
                                });
354
                                });
(-)ant/project/src/org/netbeans/spi/project/support/ant/ProjectProperties.java (-2 / +2 lines)
Lines 242-248 Link Here
242
                                            helper.maybeCallPendingHook();
242
                                            helper.maybeCallPendingHook();
243
                                        } catch (IOException e) {
243
                                        } catch (IOException e) {
244
                                            // Oh well.
244
                                            // Oh well.
245
                                            ErrorManager.getDefault().notify(e);
245
                                            ErrorManager.getDefault().dangerousNotify(e);
246
                                            reload();
246
                                            reload();
247
                                        } finally {
247
                                        } finally {
248
                                            writing = false;
248
                                            writing = false;
Lines 252-258 Link Here
252
                                        reload();
252
                                        reload();
253
                                    }
253
                                    }
254
                                    public void error(IOException e) {
254
                                    public void error(IOException e) {
255
                                        ErrorManager.getDefault().notify(e);
255
                                        ErrorManager.getDefault().dangerousNotify(e);
256
                                        reload();
256
                                        reload();
257
                                    }
257
                                    }
258
                                    private void reload() {
258
                                    private void reload() {
(-)ant/src/org/apache/tools/ant/module/xml/AntProjectSupport.java (-1 / +1 lines)
Lines 267-273 Link Here
267
            // leave projDoc the way it is...
267
            // leave projDoc the way it is...
268
            exception = e;
268
            exception = e;
269
            if (!(exception instanceof SAXParseException)) {
269
            if (!(exception instanceof SAXParseException)) {
270
                AntModule.err.annotate(exception, ErrorManager.UNKNOWN, "Strange parse error in " + this, null, null, null); // NOI18N
270
                AntModule.err.annotate(exception, ErrorManager.DangerousUnknownConstant, "Strange parse error in " + this, null, null, null); // NOI18N
271
                AntModule.err.notify(ErrorManager.INFORMATIONAL, exception);
271
                AntModule.err.notify(ErrorManager.INFORMATIONAL, exception);
272
            }
272
            }
273
        }
273
        }
(-)apisupport/project/src/org/netbeans/modules/apisupport/project/queries/GlobalSourceForBinaryImpl.java (-1 / +1 lines)
Lines 124-130 Link Here
124
                        nbsp = NetBeansSourcesParser.getInstance(nbSrcF);
124
                        nbsp = NetBeansSourcesParser.getInstance(nbSrcF);
125
                    } catch (ZipException e) {
125
                    } catch (ZipException e) {
126
                        if (!quiet) {
126
                        if (!quiet) {
127
                            Util.err.annotate(e, ErrorManager.UNKNOWN, nbSrcF + " does not seem to be a valid ZIP file.", null, null, null); // NOI18N
127
                            Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, nbSrcF + " does not seem to be a valid ZIP file.", null, null, null); // NOI18N
128
                            Util.err.notify(ErrorManager.INFORMATIONAL, e);
128
                            Util.err.notify(ErrorManager.INFORMATIONAL, e);
129
                        }
129
                        }
130
                        continue;
130
                        continue;
(-)apisupport/project/src/org/netbeans/modules/apisupport/project/universe/AbstractEntry.java (-1 / +1 lines)
Lines 83-89 Link Here
83
                }
83
                }
84
            } catch (IOException e) {
84
            } catch (IOException e) {
85
                publicClassNames = Collections.EMPTY_SET;
85
                publicClassNames = Collections.EMPTY_SET;
86
                Util.err.annotate(e, ErrorManager.UNKNOWN, "While scanning for public classes in " + this, null, null, null); // NOI18N
86
                Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "While scanning for public classes in " + this, null, null, null); // NOI18N
87
                Util.err.notify(ErrorManager.INFORMATIONAL, e);
87
                Util.err.notify(ErrorManager.INFORMATIONAL, e);
88
            }
88
            }
89
        }
89
        }
(-)apisupport/project/src/org/netbeans/modules/apisupport/project/universe/ModuleList.java (-2 / +2 lines)
Lines 267-273 Link Here
267
                scanPossibleProject(kids[i], entries, false, false, root, nbdestdir, newPathPrefix, warnReDuplicates);
267
                scanPossibleProject(kids[i], entries, false, false, root, nbdestdir, newPathPrefix, warnReDuplicates);
268
            } catch (IOException e) {
268
            } catch (IOException e) {
269
                // #60295: make it nonfatal.
269
                // #60295: make it nonfatal.
270
                Util.err.annotate(e, ErrorManager.UNKNOWN, "Malformed project metadata in " + kids[i] + ", skipping...", null, null, null); // NOI18N
270
                Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "Malformed project metadata in " + kids[i] + ", skipping...", null, null, null); // NOI18N
271
                Util.err.notify(ErrorManager.INFORMATIONAL, e);
271
                Util.err.notify(ErrorManager.INFORMATIONAL, e);
272
            }
272
            }
273
            if (depth > 1) {
273
            if (depth > 1) {
Lines 462-468 Link Here
462
                try {
462
                try {
463
                    scanPossibleProject(modules[i], entries, true, false, null, nbdestdir, null, true);
463
                    scanPossibleProject(modules[i], entries, true, false, null, nbdestdir, null, true);
464
                } catch (IOException e) {
464
                } catch (IOException e) {
465
                    Util.err.annotate(e, ErrorManager.UNKNOWN, "Malformed project metadata in " + modules[i] + ", skipping...", null, null, null); // NOI18N
465
                    Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "Malformed project metadata in " + modules[i] + ", skipping...", null, null, null); // NOI18N
466
                    Util.err.notify(ErrorManager.INFORMATIONAL, e);
466
                    Util.err.notify(ErrorManager.INFORMATIONAL, e);
467
                }
467
                }
468
            }
468
            }
(-)apisupport/project/test/qa-functional/src/org/netbeans/modules/apisupport/project/ui/customizer/BasicCustomizer.java (-2 / +2 lines)
Lines 178-186 Link Here
178
                ProjectManager.getDefault().saveProject(project);
178
                ProjectManager.getDefault().saveProject(project);
179
            }
179
            }
180
        } catch (MutexException e) {
180
        } catch (MutexException e) {
181
            ErrorManager.getDefault().notify((IOException)e.getException());
181
            ErrorManager.getDefault().dangerousNotify((IOException)e.getException());
182
        } catch (IOException ex) {
182
        } catch (IOException ex) {
183
            ErrorManager.getDefault().notify(ex);
183
            ErrorManager.getDefault().dangerousNotify(ex);
184
        }
184
        }
185
    }
185
    }
186
    
186
    
(-)apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbMoveRefactoringPlugin.java (-6 / +6 lines)
Lines 425-431 Link Here
425
                        newFile = services.createData(parentFile.getNameExt());
425
                        newFile = services.createData(parentFile.getNameExt());
426
                    }
426
                    }
427
                } catch (IOException ex) {
427
                } catch (IOException ex) {
428
                    err.notify(ex);
428
                    err.dangerousNotify(ex);
429
                }
429
                }
430
            }
430
            }
431
            String oldcontent = Utility.readFileIntoString(parentFile);
431
            String oldcontent = Utility.readFileIntoString(parentFile);
Lines 459-465 Link Here
459
                        try {
459
                        try {
460
                            parentFile.delete();
460
                            parentFile.delete();
461
                        } catch (IOException exc) {
461
                        } catch (IOException exc) {
462
                            err.notify(exc);
462
                            err.dangerousNotify(exc);
463
                        }
463
                        }
464
                    }
464
                    }
465
                    
465
                    
Lines 486-498 Link Here
486
            str = fo.getInputStream();
486
            str = fo.getInputStream();
487
            return  new EditableManifest(str);
487
            return  new EditableManifest(str);
488
        } catch (IOException exc) {
488
        } catch (IOException exc) {
489
            err.notify(exc);
489
            err.dangerousNotify(exc);
490
        } finally {
490
        } finally {
491
            if (str != null) {
491
            if (str != null) {
492
                try {
492
                try {
493
                    str.close();
493
                    str.close();
494
                } catch (IOException exc) {
494
                } catch (IOException exc) {
495
                    err.notify(exc);
495
                    err.dangerousNotify(exc);
496
                }
496
                }
497
            }
497
            }
498
        }
498
        }
Lines 508-520 Link Here
508
            manifest.write(str);
508
            manifest.write(str);
509
            
509
            
510
        } catch (IOException exc) {
510
        } catch (IOException exc) {
511
            err.notify(exc);
511
            err.dangerousNotify(exc);
512
        } finally {
512
        } finally {
513
            if (str != null) {
513
            if (str != null) {
514
                try {
514
                try {
515
                    str.close();
515
                    str.close();
516
                } catch (IOException exc) {
516
                } catch (IOException exc) {
517
                    err.notify(exc);
517
                    err.dangerousNotify(exc);
518
                }
518
                }
519
            }
519
            }
520
            if (lock != null) {
520
            if (lock != null) {
(-)apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbRenameRefactoringPlugin.java (-3 / +3 lines)
Lines 218-224 Link Here
218
            try {
218
            try {
219
                layerFile.setAttribute(oldAttrName, (type != null ? type : "") + newOne);
219
                layerFile.setAttribute(oldAttrName, (type != null ? type : "") + newOne);
220
            } catch (IOException exc) {
220
            } catch (IOException exc) {
221
                ErrorManager.getDefault().notify(exc);
221
                ErrorManager.getDefault().dangerousNotify(exc);
222
            }
222
            }
223
            if (!on) {
223
            if (!on) {
224
                handle.setAutosave(false);
224
                handle.setAutosave(false);
Lines 237-243 Link Here
237
                layerFile.setAttribute(oldKey, null);
237
                layerFile.setAttribute(oldKey, null);
238
                layerFile.setAttribute(newKey, obj);
238
                layerFile.setAttribute(newKey, obj);
239
            } catch (IOException exc) {
239
            } catch (IOException exc) {
240
                ErrorManager.getDefault().notify(exc);
240
                ErrorManager.getDefault().dangerousNotify(exc);
241
            }
241
            }
242
            if (!on) {
242
            if (!on) {
243
                handle.setAutosave(false);
243
                handle.setAutosave(false);
Lines 255-261 Link Here
255
                lock = layerFile.lock();
255
                lock = layerFile.lock();
256
                layerFile.rename(lock, newName, layerFile.getExt());
256
                layerFile.rename(lock, newName, layerFile.getExt());
257
            } catch (IOException exc) {
257
            } catch (IOException exc) {
258
                ErrorManager.getDefault().notify(exc);
258
                ErrorManager.getDefault().dangerousNotify(exc);
259
            } finally {
259
            } finally {
260
                if (lock != null) {
260
                if (lock != null) {
261
                    lock.releaseLock();
261
                    lock.releaseLock();
(-)apisupport/refactoring/src/org/netbeans/modules/apisupport/refactoring/NbSafeDeleteRefactoringPlugin.java (-7 / +7 lines)
Lines 196-218 Link Here
196
                manifest.write(stream);
196
                manifest.write(stream);
197
            } catch (FileNotFoundException ex) {
197
            } catch (FileNotFoundException ex) {
198
                //TODO
198
                //TODO
199
                err.notify(ex);
199
                err.dangerousNotify(ex);
200
            } catch (IOException exc) {
200
            } catch (IOException exc) {
201
                //TODO
201
                //TODO
202
                err.notify(exc);
202
                err.dangerousNotify(exc);
203
            } finally {
203
            } finally {
204
                if (instream != null) {
204
                if (instream != null) {
205
                    try {
205
                    try {
206
                        instream.close();
206
                        instream.close();
207
                    } catch (IOException ex) {
207
                    } catch (IOException ex) {
208
                        err.notify(ex);
208
                        err.dangerousNotify(ex);
209
                    }
209
                    }
210
                }
210
                }
211
                if (stream != null) {
211
                if (stream != null) {
212
                    try {
212
                    try {
213
                        stream.close();
213
                        stream.close();
214
                    } catch (IOException ex) {
214
                    } catch (IOException ex) {
215
                        err.notify(ex);
215
                        err.dangerousNotify(ex);
216
                    }
216
                    }
217
                }
217
                }
218
                if (lock != null) {
218
                if (lock != null) {
Lines 280-286 Link Here
280
                    try {
280
                    try {
281
                        parentFile.delete();
281
                        parentFile.delete();
282
                    } catch (IOException exc) {
282
                    } catch (IOException exc) {
283
                        err.notify(exc);
283
                        err.dangerousNotify(exc);
284
                    }
284
                    }
285
                }
285
                }
286
            }
286
            }
Lines 298-304 Link Here
298
                    Utility.writeFileFromString(parentFile, oldContent);
298
                    Utility.writeFileFromString(parentFile, oldContent);
299
                }
299
                }
300
            } catch (IOException exc) {
300
            } catch (IOException exc) {
301
                err.notify(exc);
301
                err.dangerousNotify(exc);
302
            }
302
            }
303
        }
303
        }
304
        
304
        
Lines 353-359 Link Here
353
                }
353
                }
354
                deleteEmptyParent(layerFO.getParent());
354
                deleteEmptyParent(layerFO.getParent());
355
            } catch (IOException exc) {
355
            } catch (IOException exc) {
356
                ErrorManager.getDefault().notify(exc);
356
                ErrorManager.getDefault().dangerousNotify(exc);
357
            } 
357
            } 
358
            if (!on) {
358
            if (!on) {
359
                handle.setAutosave(false);
359
                handle.setAutosave(false);
(-)autoupdate/src/org/netbeans/modules/autoupdate/ModuleUpdate.java (-4 / +4 lines)
Lines 224-230 Link Here
224
            documentElement = document.getDocumentElement();
224
            documentElement = document.getDocumentElement();
225
            node = documentElement;
225
            node = documentElement;
226
        } catch ( org.xml.sax.SAXException e ) {
226
        } catch ( org.xml.sax.SAXException e ) {
227
            ErrorManager.getDefault ().annotate (e, ErrorManager.UNKNOWN,
227
            ErrorManager.getDefault ().annotate (e, ErrorManager.DangerousUnknownConstant,
228
                    "Bad info : " + nbmFile.getName(), // NOI18N
228
                    "Bad info : " + nbmFile.getName(), // NOI18N
229
                    getMessage ("ERR_Bad_Info", nbmFile.getName ()), null, null); // NOI18N
229
                    getMessage ("ERR_Bad_Info", nbmFile.getName ()), null, null); // NOI18N
230
            ErrorManager.getDefault ().notify (ErrorManager.WARNING, e);
230
            ErrorManager.getDefault ().notify (ErrorManager.WARNING, e);
Lines 246-252 Link Here
246
            ErrorManager.getDefault().notify(ErrorManager.ERROR, e);
246
            ErrorManager.getDefault().notify(ErrorManager.ERROR, e);
247
            return null;
247
            return null;
248
        } catch ( IOException e ) {
248
        } catch ( IOException e ) {
249
            ErrorManager.getDefault ().annotate (e, ErrorManager.UNKNOWN,
249
            ErrorManager.getDefault ().annotate (e, ErrorManager.DangerousUnknownConstant,
250
                    "Missing info : " + nbmFile.getName (), // NOI18N
250
                    "Missing info : " + nbmFile.getName (), // NOI18N
251
                    getMessage ("ERR_Missing_Info", nbmFile.getName ()), null, null); // NOI18N
251
                    getMessage ("ERR_Missing_Info", nbmFile.getName ()), null, null); // NOI18N
252
            ErrorManager.getDefault ().notify (ErrorManager.WARNING, e);
252
            ErrorManager.getDefault ().notify (ErrorManager.WARNING, e);
Lines 450-461 Link Here
450
            node = documentElement;
450
            node = documentElement;
451
        }
451
        }
452
        catch ( org.xml.sax.SAXException e ) {
452
        catch ( org.xml.sax.SAXException e ) {
453
            ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "Bad info : " + nbmFile.getName(), null, null, null); // NOI18N
453
            ErrorManager.getDefault().annotate(e, ErrorManager.DangerousUnknownConstant, "Bad info : " + nbmFile.getName(), null, null, null); // NOI18N
454
            ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
454
            ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
455
            return false;
455
            return false;
456
        }
456
        }
457
        catch ( IOException e ) {
457
        catch ( IOException e ) {
458
            ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "Missing info : " + nbmFile.getName(), null, null, null); // NOI18N
458
            ErrorManager.getDefault().annotate(e, ErrorManager.DangerousUnknownConstant, "Missing info : " + nbmFile.getName(), null, null, null); // NOI18N
459
            ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
459
            ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
460
            return false;
460
            return false;
461
        }
461
        }
(-)autoupdate/src/org/netbeans/modules/autoupdate/XMLUpdates.java (-1 / +1 lines)
Lines 403-409 Link Here
403
    }
403
    }
404
    
404
    
405
    private void showParseError(Throwable t) {
405
    private void showParseError(Throwable t) {
406
        ErrorManager.getDefault().annotate(t, ErrorManager.UNKNOWN, "URL: " + xmlURL, null, null, null); // NOI18N
406
        ErrorManager.getDefault().annotate(t, ErrorManager.DangerousUnknownConstant, "URL: " + xmlURL, null, null, null); // NOI18N
407
        ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, t);
407
        ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, t);
408
    }
408
    }
409
409
(-)core/bootstrap/src/org/netbeans/ChangeFirer.java (-1 / +1 lines)
Lines 92-98 Link Here
92
            modulesDeleted.clear();
92
            modulesDeleted.clear();
93
        } catch (RuntimeException e) {
93
        } catch (RuntimeException e) {
94
            // Recover gracefully.
94
            // Recover gracefully.
95
            Util.err.notify(e);
95
            Util.err.dangerousNotify(e);
96
        } finally {
96
        } finally {
97
            mgr.readOnly(false);
97
            mgr.readOnly(false);
98
        }
98
        }
(-)core/bootstrap/src/org/netbeans/Events.java (-1 / +1 lines)
Lines 134-140 Link Here
134
        } catch (RuntimeException re) {
134
        } catch (RuntimeException re) {
135
            // If there is any problem logging, it should not kill the system
135
            // If there is any problem logging, it should not kill the system
136
            // which called the logger.
136
            // which called the logger.
137
            Util.err.notify(re);
137
            Util.err.dangerousNotify(re);
138
        }
138
        }
139
    }
139
    }
140
    
140
    
(-)core/bootstrap/src/org/netbeans/FixedModule.java (-1 / +1 lines)
Lines 80-86 Link Here
80
                            // Fine, ignore.
80
                            // Fine, ignore.
81
                        }
81
                        }
82
                    } catch (MissingResourceException mre) {
82
                    } catch (MissingResourceException mre) {
83
                        Util.err.notify(mre);
83
                        Util.err.dangerousNotify(mre);
84
                    }
84
                    }
85
                } else {
85
                } else {
86
                    Util.err.log(ErrorManager.WARNING, "WARNING - cannot efficiently load non-*.properties OpenIDE-Module-Localizing-Bundle: " + locb);
86
                    Util.err.log(ErrorManager.WARNING, "WARNING - cannot efficiently load non-*.properties OpenIDE-Module-Localizing-Bundle: " + locb);
(-)core/bootstrap/src/org/netbeans/ModuleManager.java (-5 / +5 lines)
Lines 101-108 Link Here
101
                    try {
101
                    try {
102
                        classLoaderPatches.add(new JarFile(f));
102
                        classLoaderPatches.add(new JarFile(f));
103
                    } catch (IOException ioe) {
103
                    } catch (IOException ioe) {
104
                        Util.err.annotate(ioe, ErrorManager.UNKNOWN, "Problematic file: " + f, null, null, null);
104
                        Util.err.annotate(ioe, ErrorManager.DangerousUnknownConstant, "Problematic file: " + f, null, null, null);
105
                        Util.err.notify(ioe);
105
                        Util.err.dangerousNotify(ioe);
106
                    }
106
                    }
107
                }
107
                }
108
            }
108
            }
Lines 336-342 Link Here
336
        try {
336
        try {
337
            nue = new SystemClassLoader(classLoaderPatches, parentCLs, modules);
337
            nue = new SystemClassLoader(classLoaderPatches, parentCLs, modules);
338
        } catch (IllegalArgumentException iae) {
338
        } catch (IllegalArgumentException iae) {
339
            Util.err.notify(iae);
339
            Util.err.dangerousNotify(iae);
340
            nue = new SystemClassLoader(classLoaderPatches, new ClassLoader[] {ModuleManager.class.getClassLoader()}, Collections.EMPTY_SET);
340
            nue = new SystemClassLoader(classLoaderPatches, new ClassLoader[] {ModuleManager.class.getClassLoader()}, Collections.EMPTY_SET);
341
        }
341
        }
342
        synchronized (classLoaderLock) {
342
        synchronized (classLoaderLock) {
Lines 1570-1578 Link Here
1570
            try {
1570
            try {
1571
                midHook.run();
1571
                midHook.run();
1572
            } catch (RuntimeException e) {
1572
            } catch (RuntimeException e) {
1573
                Util.err.notify(e);
1573
                Util.err.dangerousNotify(e);
1574
            } catch (LinkageError e) {
1574
            } catch (LinkageError e) {
1575
                Util.err.notify(e);
1575
                Util.err.dangerousNotify(e);
1576
            }
1576
            }
1577
        }
1577
        }
1578
        installer.close(modules);
1578
        installer.close(modules);
(-)core/bootstrap/src/org/netbeans/StandardModule.java (-2 / +2 lines)
Lines 141-147 Link Here
141
                            // Fine, ignore.
141
                            // Fine, ignore.
142
                        }
142
                        }
143
                    } catch (MissingResourceException mre) {
143
                    } catch (MissingResourceException mre) {
144
                        Util.err.notify(mre);
144
                        Util.err.dangerousNotify(mre);
145
                    }
145
                    }
146
                } else {
146
                } else {
147
                    Util.err.log(ErrorManager.WARNING, "WARNING - cannot efficiently load non-*.properties OpenIDE-Module-Localizing-Bundle: " + locb);
147
                    Util.err.log(ErrorManager.WARNING, "WARNING - cannot efficiently load non-*.properties OpenIDE-Module-Localizing-Bundle: " + locb);
Lines 263-269 Link Here
263
            }
263
            }
264
        } catch (IOException e) {
264
        } catch (IOException e) {
265
            if (jarBeingOpened != null) {
265
            if (jarBeingOpened != null) {
266
                Util.err.annotate(e, ErrorManager.UNKNOWN, "While loading manifest from: " + jarBeingOpened, null, null, null); // NOI18N
266
                Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "While loading manifest from: " + jarBeingOpened, null, null, null); // NOI18N
267
            }
267
            }
268
            throw e;
268
            throw e;
269
        }
269
        }
(-)core/bootstrap/src/org/netbeans/Util.java (-1 / +1 lines)
Lines 730-736 Link Here
730
                    if (rel == -1) rel = 0; // XXX will this lead to incorrect semantics?
730
                    if (rel == -1) rel = 0; // XXX will this lead to incorrect semantics?
731
                    return new SpecificationVersion("" + rel + "." + d.getVersion()); // NOI18N
731
                    return new SpecificationVersion("" + rel + "." + d.getVersion()); // NOI18N
732
                } catch (NumberFormatException nfe) {
732
                } catch (NumberFormatException nfe) {
733
                    Util.err.notify(nfe);
733
                    Util.err.dangerousNotify(nfe);
734
                    return null;
734
                    return null;
735
                }
735
                }
736
            }
736
            }
(-)core/execution/src/org/netbeans/core/execution/DefaultSysProcess.java (-1 / +1 lines)
Lines 99-105 Link Here
99
                        Thread.sleep(1000);
99
                        Thread.sleep(1000);
100
                    }
100
                    }
101
                } catch (InterruptedException e) {
101
                } catch (InterruptedException e) {
102
                    ErrorManager.getDefault().notify(e);
102
                    ErrorManager.getDefault().dangerousNotify(e);
103
                }
103
                }
104
                if (!group.isDestroyed()) group.destroy();
104
                if (!group.isDestroyed()) group.destroy();
105
            }
105
            }
(-)core/favorites/src/org/netbeans/modules/favorites/Actions.java (-4 / +4 lines)
Lines 213-219 Link Here
213
                    try {
213
                    try {
214
                        shad.delete();
214
                        shad.delete();
215
                    } catch (IOException ex) {
215
                    } catch (IOException ex) {
216
                        ErrorManager.getDefault().notify(ex);
216
                        ErrorManager.getDefault().dangerousNotify(ex);
217
                    }
217
                    }
218
                }
218
                }
219
            }
219
            }
Lines 347-353 Link Here
347
                reorderAfterAddition(f, arr, listAdd);
347
                reorderAfterAddition(f, arr, listAdd);
348
                selectAfterAddition(createdDO);               
348
                selectAfterAddition(createdDO);               
349
            } catch (DataObjectNotFoundException e) {
349
            } catch (DataObjectNotFoundException e) {
350
                ErrorManager.getDefault().notify(e);  
350
                ErrorManager.getDefault().dangerousNotify(e);  
351
            }
351
            }
352
        }
352
        }
353
        
353
        
Lines 439-445 Link Here
439
                            listAdd.add(obj.createShadow(favourities));
439
                            listAdd.add(obj.createShadow(favourities));
440
                        }
440
                        }
441
                    } catch (IOException ex) {
441
                    } catch (IOException ex) {
442
                        ErrorManager.getDefault().notify(ex);
442
                        ErrorManager.getDefault().dangerousNotify(ex);
443
                    }
443
                    }
444
                }
444
                }
445
            }
445
            }
Lines 478-484 Link Here
478
                try {
478
                try {
479
                    favourities.setOrder(newOrder);
479
                    favourities.setOrder(newOrder);
480
                } catch (IOException ex) {
480
                } catch (IOException ex) {
481
                    ErrorManager.getDefault().notify(ex);
481
                    ErrorManager.getDefault().dangerousNotify(ex);
482
                }
482
                }
483
            }
483
            }
484
        }
484
        }
(-)core/favorites/src/org/netbeans/modules/favorites/Favorites.java (-1 / +1 lines)
Lines 87-93 Link Here
87
            DataFolder folder = DataFolder.findFolder(fo);
87
            DataFolder folder = DataFolder.findFolder(fo);
88
            return folder;
88
            return folder;
89
        } catch (IOException ex) {
89
        } catch (IOException ex) {
90
            ErrorManager.getDefault().notify (ex);
90
            ErrorManager.getDefault().dangerousNotify (ex);
91
            return DataFolder.findFolder (
91
            return DataFolder.findFolder (
92
                Repository.getDefault().getDefaultFileSystem().getRoot()
92
                Repository.getDefault().getDefaultFileSystem().getRoot()
93
            );
93
            );
(-)core/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java (-4 / +4 lines)
Lines 112-118 Link Here
112
                    mergeModel.setValue(mergeModel.getValue() + 1);
112
                    mergeModel.setValue(mergeModel.getValue() + 1);
113
                }
113
                }
114
            } catch (HelpSetException hse) {
114
            } catch (HelpSetException hse) {
115
                Installer.err.notify(hse);
115
                Installer.err.dangerousNotify(hse);
116
                master = new HelpSet();
116
                master = new HelpSet();
117
            } catch (MalformedURLException mfue) {
117
            } catch (MalformedURLException mfue) {
118
                mfue.printStackTrace();
118
                mfue.printStackTrace();
Lines 745-751 Link Here
745
                jh.setCurrentURL(url);
745
                jh.setCurrentURL(url);
746
            }
746
            }
747
        } catch (RuntimeException e) {
747
        } catch (RuntimeException e) {
748
            Installer.err.notify(e);
748
            Installer.err.dangerousNotify(e);
749
        }
749
        }
750
    }
750
    }
751
751
Lines 775-783 Link Here
775
            jh = new JHelp(hs);
775
            jh = new JHelp(hs);
776
        } catch (RuntimeException e) {
776
        } catch (RuntimeException e) {
777
            if (title != null) {
777
            if (title != null) {
778
                Installer.err.annotate(e, ErrorManager.UNKNOWN, "While trying to display: " + title, null, null, null); // NOI18N
778
                Installer.err.annotate(e, ErrorManager.DangerousUnknownConstant, "While trying to display: " + title, null, null, null); // NOI18N
779
            }
779
            }
780
            Installer.err.notify(e);
780
            Installer.err.dangerousNotify(e);
781
            return new JHelp();
781
            return new JHelp();
782
        }
782
        }
783
        synchronized (availableJHelps) {
783
        synchronized (availableJHelps) {
(-)core/palette/src/org/netbeans/modules/palette/PaletteEnvironmentProvider.java (-1 / +1 lines)
Lines 98-104 Link Here
98
                try {
98
                try {
99
                    o = getInstance();
99
                    o = getInstance();
100
                } catch (Exception ex) {
100
                } catch (Exception ex) {
101
                    ErrorManager.getDefault().notify(ex);
101
                    ErrorManager.getDefault().dangerousNotify(ex);
102
                }
102
                }
103
            }
103
            }
104
           
104
           
(-)core/palette/src/org/netbeans/modules/palette/Utils.java (-5 / +5 lines)
Lines 128-134 Link Here
128
                    newTypes[0].create();
128
                    newTypes[0].create();
129
                }
129
                }
130
            } catch (java.io.IOException e) {
130
            } catch (java.io.IOException e) {
131
                ErrorManager.getDefault().notify(e);
131
                ErrorManager.getDefault().dangerousNotify(e);
132
            }
132
            }
133
        }
133
        }
134
    }
134
    }
Lines 263-269 Link Here
263
                try {
263
                try {
264
                    categoryNode.destroy();
264
                    categoryNode.destroy();
265
                } catch (java.io.IOException e) {
265
                } catch (java.io.IOException e) {
266
                    ErrorManager.getDefault().notify(e);
266
                    ErrorManager.getDefault().dangerousNotify(e);
267
                }
267
                }
268
            }
268
            }
269
        }
269
        }
Lines 297-303 Link Here
297
                    if (!"".equals(newName)) // NOI18N
297
                    if (!"".equals(newName)) // NOI18N
298
                    categoryNode.setName(newName);
298
                    categoryNode.setName(newName);
299
                } catch (IllegalArgumentException e) {
299
                } catch (IllegalArgumentException e) {
300
                    ErrorManager.getDefault().notify(e);
300
                    ErrorManager.getDefault().dangerousNotify(e);
301
                }
301
                }
302
            }
302
            }
303
        }
303
        }
Lines 364-370 Link Here
364
                        clipboard.setContents(trans, owner);
364
                        clipboard.setContents(trans, owner);
365
                    }
365
                    }
366
                } catch (java.io.IOException e) {
366
                } catch (java.io.IOException e) {
367
                    ErrorManager.getDefault().notify(e);
367
                    ErrorManager.getDefault().dangerousNotify(e);
368
                }
368
                }
369
            }
369
            }
370
        }
370
        }
Lines 463-469 Link Here
463
                try {
463
                try {
464
                    itemNode.destroy();
464
                    itemNode.destroy();
465
                } catch (java.io.IOException e) {
465
                } catch (java.io.IOException e) {
466
                    ErrorManager.getDefault().notify(e);
466
                    ErrorManager.getDefault().dangerousNotify(e);
467
                }
467
                }
468
            }
468
            }
469
        }
469
        }
(-)core/palette/src/org/netbeans/modules/palette/ui/Customizer.java (-1 / +1 lines)
Lines 277-283 Link Here
277
                }
277
                }
278
            }
278
            }
279
            catch (java.io.IOException e) {
279
            catch (java.io.IOException e) {
280
                ErrorManager.getDefault().notify(e);
280
                ErrorManager.getDefault().dangerousNotify(e);
281
            }
281
            }
282
        }
282
        }
283
    }//GEN-LAST:event_removeButtonActionPerformed
283
    }//GEN-LAST:event_removeButtonActionPerformed
(-)core/src/org/netbeans/core/NbErrorManager.java (-4 / +4 lines)
Lines 406-412 Link Here
406
                } else {
406
                } else {
407
                    l = new ArrayList(l);
407
                    l = new ArrayList(l);
408
                }
408
                }
409
                l.add(new Ann(UNKNOWN, null, null, t2, null));
409
                l.add(new Ann(DangerousUnknownConstant, null, null, t2, null));
410
            }
410
            }
411
        }
411
        }
412
        if (t instanceof SAXParseException) {
412
        if (t instanceof SAXParseException) {
Lines 428-434 Link Here
428
                } else {
428
                } else {
429
                    l = new ArrayList(l);
429
                    l = new ArrayList(l);
430
                }
430
                }
431
                l.add(new Ann(UNKNOWN, msg, null, null, null));
431
                l.add(new Ann(DangerousUnknownConstant, msg, null, null, null));
432
            }
432
            }
433
        }
433
        }
434
        
434
        
Lines 606-612 Link Here
606
606
607
        /** @return the severity of the exception */
607
        /** @return the severity of the exception */
608
        int getSeverity () {
608
        int getSeverity () {
609
            if (severity != UNKNOWN) {
609
            if (severity != DangerousUnknownConstant) {
610
                return severity;
610
                return severity;
611
            }
611
            }
612
612
Lines 618-624 Link Here
618
                }
618
                }
619
            }
619
            }
620
620
621
            if (severity == UNKNOWN) {
621
            if (severity == DangerousUnknownConstant) {
622
                // no severity specified, assume this is an error
622
                // no severity specified, assume this is an error
623
                severity = t instanceof Error ? ERROR : EXCEPTION;
623
                severity = t instanceof Error ? ERROR : EXCEPTION;
624
            }
624
            }
(-)core/src/org/netbeans/core/filesystems/DefaultParser.java (-1 / +1 lines)
Lines 119-125 Link Here
119
        } catch (SAXException sex) {
119
        } catch (SAXException sex) {
120
            if (!isStopException(sex)) {
120
            if (!isStopException(sex)) {
121
                ErrorManager emgr = ErrorManager.getDefault();
121
                ErrorManager emgr = ErrorManager.getDefault();
122
                emgr.annotate(sex, ErrorManager.UNKNOWN, "While parsing: " + fo, null, null, null); // NOI18N
122
                emgr.annotate(sex, ErrorManager.DangerousUnknownConstant, "While parsing: " + fo, null, null, null); // NOI18N
123
                emgr.notify(ErrorManager.INFORMATIONAL, sex);
123
                emgr.notify(ErrorManager.INFORMATIONAL, sex);
124
                state = ERROR;
124
                state = ERROR;
125
            }
125
            }
(-)core/startup/src/org/netbeans/core/startup/AutomaticDependencies.java (-2 / +2 lines)
Lines 86-95 Link Here
86
		is.setByteStream(inS);
86
		is.setByteStream(inS);
87
                p.parse(is);
87
                p.parse(is);
88
            } catch (SAXException e) {
88
            } catch (SAXException e) {
89
                Util.err.annotate(e, ErrorManager.UNKNOWN, "While parsing: " + id, null, null, null);
89
                Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "While parsing: " + id, null, null, null);
90
                throw e;
90
                throw e;
91
            } catch (IOException e) {
91
            } catch (IOException e) {
92
                Util.err.annotate(e, ErrorManager.UNKNOWN, "While parsing: " + id, null, null, null);
92
                Util.err.annotate(e, ErrorManager.DangerousUnknownConstant, "While parsing: " + id, null, null, null);
93
                throw e;
93
                throw e;
94
            }
94
            }
95
	    finally {
95
	    finally {
(-)core/startup/src/org/netbeans/core/startup/ManifestSection.java (-2 / +2 lines)
Lines 114-120 Link Here
114
                }
114
                }
115
                return clazz;
115
                return clazz;
116
            } catch (ClassNotFoundException cnfe) {
116
            } catch (ClassNotFoundException cnfe) {
117
                Util.err.annotate(cnfe, ErrorManager.UNKNOWN, "Loader for ClassNotFoundException: " + getClassLoader(), null, null, null);
117
                Util.err.annotate(cnfe, ErrorManager.DangerousUnknownConstant, "Loader for ClassNotFoundException: " + getClassLoader(), null, null, null);
118
                problem = cnfe;
118
                problem = cnfe;
119
                throw problem;
119
                throw problem;
120
            } catch (Exception e) {
120
            } catch (Exception e) {
Lines 155-161 Link Here
155
                }
155
                }
156
                return o;
156
                return o;
157
            } catch (ClassNotFoundException cnfe) {
157
            } catch (ClassNotFoundException cnfe) {
158
                Util.err.annotate(cnfe, ErrorManager.UNKNOWN, "Loader for ClassNotFoundException: " + getClassLoader(), null, null, null);
158
                Util.err.annotate(cnfe, ErrorManager.DangerousUnknownConstant, "Loader for ClassNotFoundException: " + getClassLoader(), null, null, null);
159
                throw cnfe;
159
                throw cnfe;
160
            } catch (LinkageError le) {
160
            } catch (LinkageError le) {
161
                throw new ClassNotFoundException(le.toString(), le);
161
                throw new ClassNotFoundException(le.toString(), le);
(-)core/startup/src/org/netbeans/core/startup/ModuleSystem.java (-1 / +1 lines)
Lines 195-201 Link Here
195
                    is = manifestUrl.openStream();
195
                    is = manifestUrl.openStream();
196
                } catch (IOException ioe) {
196
                } catch (IOException ioe) {
197
                    // Debugging for e.g. #32493 - which JAR was guilty?
197
                    // Debugging for e.g. #32493 - which JAR was guilty?
198
                    Util.err.annotate(ioe, ErrorManager.UNKNOWN, "URL: " + manifestUrl, null, null, null); // NOI18N
198
                    Util.err.annotate(ioe, ErrorManager.DangerousUnknownConstant, "URL: " + manifestUrl, null, null, null); // NOI18N
199
                    throw ioe;
199
                    throw ioe;
200
                }
200
                }
201
                try {
201
                try {
(-)core/startup/src/org/netbeans/core/startup/NbInstaller.java (-5 / +5 lines)
Lines 1347-1353 Link Here
1347
                ev.log(Events.PERF_END, "NbInstaller - loadManifestCache"); // NOI18N
1347
                ev.log(Events.PERF_END, "NbInstaller - loadManifestCache"); // NOI18N
1348
            }
1348
            }
1349
        } catch (IOException ioe) {
1349
        } catch (IOException ioe) {
1350
            Util.err.annotate(ioe, ErrorManager.UNKNOWN, "While reading: " + manifestCacheFile, null, null, null); // NOI18N
1350
            Util.err.annotate(ioe, ErrorManager.DangerousUnknownConstant, "While reading: " + manifestCacheFile, null, null, null); // NOI18N
1351
            Util.err.notify(ErrorManager.WARNING, ioe);
1351
            Util.err.notify(ErrorManager.WARNING, ioe);
1352
            return new HashMap(200);
1352
            return new HashMap(200);
1353
        }
1353
        }
Lines 1389-1395 Link Here
1389
            try {
1389
            try {
1390
                mani = new Manifest(new ByteArrayInputStream(data, pos, end - pos));
1390
                mani = new Manifest(new ByteArrayInputStream(data, pos, end - pos));
1391
            } catch (IOException ioe) {
1391
            } catch (IOException ioe) {
1392
                Util.err.annotate(ioe, ErrorManager.UNKNOWN, "While in entry for " + jar, null, null, null);
1392
                Util.err.annotate(ioe, ErrorManager.DangerousUnknownConstant, "While in entry for " + jar, null, null, null);
1393
                throw ioe;
1393
                throw ioe;
1394
            }
1394
            }
1395
            m.put(jar, new Object[] {new Date(time), mani});
1395
            m.put(jar, new Object[] {new Date(time), mani});
Lines 1427-1439 Link Here
1427
                            try {
1427
                            try {
1428
                                Class.forName(clazz, false, m.getClassLoader());
1428
                                Class.forName(clazz, false, m.getClassLoader());
1429
                            } catch (ClassNotFoundException cnfe) { // e.g. "Will not load classes from default package" from ProxyClassLoader
1429
                            } catch (ClassNotFoundException cnfe) { // e.g. "Will not load classes from default package" from ProxyClassLoader
1430
                                Util.err.annotate(cnfe, ErrorManager.UNKNOWN, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1430
                                Util.err.annotate(cnfe, ErrorManager.DangerousUnknownConstant, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1431
                                Util.err.notify(ErrorManager.INFORMATIONAL, cnfe);
1431
                                Util.err.notify(ErrorManager.INFORMATIONAL, cnfe);
1432
                            } catch (LinkageError le) {
1432
                            } catch (LinkageError le) {
1433
                                Util.err.annotate(le, ErrorManager.UNKNOWN, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1433
                                Util.err.annotate(le, ErrorManager.DangerousUnknownConstant, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1434
                                Util.err.notify(ErrorManager.INFORMATIONAL, le);
1434
                                Util.err.notify(ErrorManager.INFORMATIONAL, le);
1435
                            } catch (RuntimeException re) { // e.g. IllegalArgumentException from package defs
1435
                            } catch (RuntimeException re) { // e.g. IllegalArgumentException from package defs
1436
                                Util.err.annotate(re, ErrorManager.UNKNOWN, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1436
                                Util.err.annotate(re, ErrorManager.DangerousUnknownConstant, "From " + clazz + " in " + m.getCodeNameBase() + " with effective classpath " + getEffectiveClasspath(m), null, null, null); // NOI18N
1437
                                Util.err.notify(ErrorManager.INFORMATIONAL, re);
1437
                                Util.err.notify(ErrorManager.INFORMATIONAL, re);
1438
                            }
1438
                            }
1439
                        }
1439
                        }
(-)core/startup/src/org/netbeans/core/startup/layers/SystemFileSystem.java (-1 / +1 lines)
Lines 176-182 Link Here
176
                        // ignore--normal
176
                        // ignore--normal
177
                    }
177
                    }
178
                } catch (MissingResourceException ex) {
178
                } catch (MissingResourceException ex) {
179
                    ErrorManager.getDefault().annotate(ex, ErrorManager.UNKNOWN, "Computing display name for " + fo, null, null, null); // NOI18N
179
                    ErrorManager.getDefault().annotate(ex, ErrorManager.DangerousUnknownConstant, "Computing display name for " + fo, null, null, null); // NOI18N
180
                    ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
180
                    ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
181
                    // ignore
181
                    // ignore
182
                }
182
                }
(-)core/test/unit/src/org/netbeans/core/NbErrorManagerTest.java (-10 / +10 lines)
Lines 115-121 Link Here
115
        assertTrue(s.indexOf("java.lang.NullPointerException: unloc msg") != -1);
115
        assertTrue(s.indexOf("java.lang.NullPointerException: unloc msg") != -1);
116
        assertTrue(s.indexOf("loc msg #1") != -1);
116
        assertTrue(s.indexOf("loc msg #1") != -1);
117
        npe = new NullPointerException("unloc msg");
117
        npe = new NullPointerException("unloc msg");
118
        err.annotate(npe, ErrorManager.UNKNOWN, "extra unloc msg", null, null, null);
118
        err.annotate(npe, ErrorManager.DangerousUnknownConstant, "extra unloc msg", null, null, null);
119
        err.notify(ErrorManager.INFORMATIONAL, npe);
119
        err.notify(ErrorManager.INFORMATIONAL, npe);
120
        s = w.toString();
120
        s = w.toString();
121
        assertTrue(s.indexOf("extra unloc msg") != -1);
121
        assertTrue(s.indexOf("extra unloc msg") != -1);
Lines 202-208 Link Here
202
        
202
        
203
        // Simple exception is EXCEPTION.
203
        // Simple exception is EXCEPTION.
204
        Throwable t = new IOException("unloc msg");
204
        Throwable t = new IOException("unloc msg");
205
        NbErrorManager.Exc x = err.createExc(t, ErrorManager.UNKNOWN);
205
        NbErrorManager.Exc x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
206
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
206
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
207
        assertEquals("unloc msg", x.getMessage());
207
        assertEquals("unloc msg", x.getMessage());
208
        assertEquals("unloc msg", x.getLocalizedMessage());
208
        assertEquals("unloc msg", x.getLocalizedMessage());
Lines 210-217 Link Here
210
        
210
        
211
        // Same when there is unloc debug info attached.
211
        // Same when there is unloc debug info attached.
212
        t = new IOException("unloc msg");
212
        t = new IOException("unloc msg");
213
        err.annotate(t, ErrorManager.UNKNOWN, "some debug info", null, null, null);
213
        err.annotate(t, ErrorManager.DangerousUnknownConstant, "some debug info", null, null, null);
214
        x = err.createExc(t, ErrorManager.UNKNOWN);
214
        x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
215
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
215
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
216
        assertEquals("unloc msg", x.getMessage());
216
        assertEquals("unloc msg", x.getMessage());
217
        assertEquals("unloc msg", x.getLocalizedMessage());
217
        assertEquals("unloc msg", x.getLocalizedMessage());
Lines 220-227 Link Here
220
        // Nested exceptions don't necessarily change anything severity-wise.
220
        // Nested exceptions don't necessarily change anything severity-wise.
221
        t = new IOException("unloc msg");
221
        t = new IOException("unloc msg");
222
        Throwable t2 = new IOException("unloc msg #2");
222
        Throwable t2 = new IOException("unloc msg #2");
223
        err.annotate(t, ErrorManager.UNKNOWN, null, null, t2, null);
223
        err.annotate(t, ErrorManager.DangerousUnknownConstant, null, null, t2, null);
224
        x = err.createExc(t, ErrorManager.UNKNOWN);
224
        x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
225
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
225
        assertEquals(ErrorManager.EXCEPTION, x.getSeverity());
226
        assertEquals("unloc msg", x.getMessage());
226
        assertEquals("unloc msg", x.getMessage());
227
        assertEquals("unloc msg", x.getLocalizedMessage());
227
        assertEquals("unloc msg", x.getLocalizedMessage());
Lines 231-237 Link Here
231
        // set the severity for the exception.
231
        // set the severity for the exception.
232
        t = new IOException("unloc msg");
232
        t = new IOException("unloc msg");
233
        err.annotate(t, ErrorManager.USER, null, "loc msg", null, null);
233
        err.annotate(t, ErrorManager.USER, null, "loc msg", null, null);
234
        x = err.createExc(t, ErrorManager.UNKNOWN);
234
        x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
235
        assertEquals(ErrorManager.USER, x.getSeverity());
235
        assertEquals(ErrorManager.USER, x.getSeverity());
236
        assertEquals("unloc msg", x.getMessage());
236
        assertEquals("unloc msg", x.getMessage());
237
        assertEquals("loc msg", x.getLocalizedMessage());
237
        assertEquals("loc msg", x.getLocalizedMessage());
Lines 241-248 Link Here
241
        t = new IOException("unloc msg");
241
        t = new IOException("unloc msg");
242
        t2 = new IOException("unloc msg #2");
242
        t2 = new IOException("unloc msg #2");
243
        err.annotate(t2, ErrorManager.USER, null, "loc msg", null, null);
243
        err.annotate(t2, ErrorManager.USER, null, "loc msg", null, null);
244
        err.annotate(t, ErrorManager.UNKNOWN, null, null, t2, null);
244
        err.annotate(t, ErrorManager.DangerousUnknownConstant, null, null, t2, null);
245
        x = err.createExc(t, ErrorManager.UNKNOWN);
245
        x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
246
        assertEquals(ErrorManager.USER, x.getSeverity());
246
        assertEquals(ErrorManager.USER, x.getSeverity());
247
        assertEquals("unloc msg", x.getMessage());
247
        assertEquals("unloc msg", x.getMessage());
248
        assertEquals("loc msg", x.getLocalizedMessage());
248
        assertEquals("loc msg", x.getLocalizedMessage());
Lines 253-259 Link Here
253
        err.annotate(t2, ErrorManager.USER, null, "loc msg", null, null);
253
        err.annotate(t2, ErrorManager.USER, null, "loc msg", null, null);
254
        t = new IOException("loc msg");
254
        t = new IOException("loc msg");
255
        err.annotate(t, ErrorManager.USER, null, null, t2, null);
255
        err.annotate(t, ErrorManager.USER, null, null, t2, null);
256
        x = err.createExc(t, ErrorManager.UNKNOWN);
256
        x = err.createExc(t, ErrorManager.DangerousUnknownConstant);
257
        assertEquals(ErrorManager.USER, x.getSeverity());
257
        assertEquals(ErrorManager.USER, x.getSeverity());
258
        assertEquals("loc msg", x.getMessage());
258
        assertEquals("loc msg", x.getMessage());
259
        assertEquals("loc msg", x.getLocalizedMessage());
259
        assertEquals("loc msg", x.getLocalizedMessage());
(-)db/core/src/org/netbeans/modules/db/sql/loader/SQLDataLoaderBeanInfo.java (-1 / +1 lines)
Lines 31-37 Link Here
31
        try {
31
        try {
32
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
32
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
33
        } catch (IntrospectionException ie) {
33
        } catch (IntrospectionException ie) {
34
	    ErrorManager.getDefault().notify(ie);
34
	    ErrorManager.getDefault().dangerousNotify(ie);
35
            return null;
35
            return null;
36
        }
36
        }
37
    }
37
    }
(-)db/core/src/org/netbeans/modules/db/sql/loader/SQLEditorSupport.java (-4 / +4 lines)
Lines 191-197 Link Here
191
            try {
191
            try {
192
                getDataObject().delete();
192
                getDataObject().delete();
193
            } catch (IOException e) {
193
            } catch (IOException e) {
194
                ErrorManager.getDefault().notify(e);
194
                ErrorManager.getDefault().dangerousNotify(e);
195
            }
195
            }
196
        }
196
        }
197
    }
197
    }
Lines 249-258 Link Here
249
                        }
249
                        }
250
                    });
250
                    });
251
                } catch (InterruptedException e) {
251
                } catch (InterruptedException e) {
252
                    ErrorManager.getDefault().notify(e);
252
                    ErrorManager.getDefault().dangerousNotify(e);
253
                    return;
253
                    return;
254
                } catch (InvocationTargetException e) {
254
                } catch (InvocationTargetException e) {
255
                    ErrorManager.getDefault().notify(e);
255
                    ErrorManager.getDefault().dangerousNotify(e);
256
                    return;
256
                    return;
257
                }
257
                }
258
            } else {
258
            } else {
Lines 358-364 Link Here
358
                        executionResults.close();
358
                        executionResults.close();
359
                    } catch (SQLException e) {
359
                    } catch (SQLException e) {
360
                        // probably broken connection
360
                        // probably broken connection
361
                        ErrorManager.getDefault().notify(e);
361
                        ErrorManager.getDefault().dangerousNotify(e);
362
                    }
362
                    }
363
                    executionResults = null;
363
                    executionResults = null;
364
                }
364
                }
(-)db/src/org/netbeans/api/db/explorer/ConnectionManager.java (-1 / +1 lines)
Lines 186-192 Link Here
186
            dbconn.getDelegate().disconnect();
186
            dbconn.getDelegate().disconnect();
187
        } catch (DatabaseException e) {
187
        } catch (DatabaseException e) {
188
            // XXX maybe shouldn't catch the exception
188
            // XXX maybe shouldn't catch the exception
189
            ErrorManager.getDefault().notify(e);
189
            ErrorManager.getDefault().dangerousNotify(e);
190
        }
190
        }
191
    }
191
    }
192
    
192
    
(-)db/src/org/netbeans/modules/db/explorer/DatabaseConnection.java (-6 / +6 lines)
Lines 677-683 Link Here
677
        try {
677
        try {
678
            nodeName = findConnectionNodeInfo(getName()).getNode().getName();
678
            nodeName = findConnectionNodeInfo(getName()).getNode().getName();
679
        } catch (DatabaseException e) {
679
        } catch (DatabaseException e) {
680
            ErrorManager.getDefault().notify(e);
680
            ErrorManager.getDefault().dangerousNotify(e);
681
            return;
681
            return;
682
        }
682
        }
683
        
683
        
Lines 709-722 Link Here
709
        try {
709
        try {
710
            node = NodeOp.findPath(runtimeNode, new String[] { "Databases", nodeName }); // NOI18N
710
            node = NodeOp.findPath(runtimeNode, new String[] { "Databases", nodeName }); // NOI18N
711
        } catch (NodeNotFoundException e) {
711
        } catch (NodeNotFoundException e) {
712
            ErrorManager.getDefault().notify(e);
712
            ErrorManager.getDefault().dangerousNotify(e);
713
            return;
713
            return;
714
        }
714
        }
715
        
715
        
716
        try {
716
        try {
717
            runtimeExplorer.setSelectedNodes(new Node[] { node });
717
            runtimeExplorer.setSelectedNodes(new Node[] { node });
718
        } catch (PropertyVetoException e) {
718
        } catch (PropertyVetoException e) {
719
            ErrorManager.getDefault().notify(e);
719
            ErrorManager.getDefault().dangerousNotify(e);
720
            return;
720
            return;
721
        }
721
        }
722
    
722
    
Lines 738-744 Link Here
738
                }
738
                }
739
            }
739
            }
740
        } catch (DatabaseException e) {
740
        } catch (DatabaseException e) {
741
            ErrorManager.getDefault().notify(e);
741
            ErrorManager.getDefault().dangerousNotify(e);
742
        }
742
        }
743
    }
743
    }
744
    
744
    
Lines 749-757 Link Here
749
                return cni.getConnection();
749
                return cni.getConnection();
750
            }
750
            }
751
        } catch (DatabaseException e) {
751
        } catch (DatabaseException e) {
752
            ErrorManager.getDefault().notify(e);
752
            ErrorManager.getDefault().dangerousNotify(e);
753
        } catch (SQLException e) {
753
        } catch (SQLException e) {
754
            ErrorManager.getDefault().notify(e);
754
            ErrorManager.getDefault().dangerousNotify(e);
755
        }
755
        }
756
        return null;
756
        return null;
757
    }
757
    }
(-)db/src/org/netbeans/modules/db/explorer/DatabaseConnectionConvertor.java (-1 / +1 lines)
Lines 198-204 Link Here
198
            try {
198
            try {
199
                create((DatabaseConnection)i.next());
199
                create((DatabaseConnection)i.next());
200
            } catch (IOException e) {
200
            } catch (IOException e) {
201
                ErrorManager.getDefault().notify(e);
201
                ErrorManager.getDefault().dangerousNotify(e);
202
            }
202
            }
203
            i.remove();
203
            i.remove();
204
        }
204
        }
(-)db/src/org/netbeans/modules/db/explorer/DatabaseOption.java (-1 / +1 lines)
Lines 219-225 Link Here
219
                        try {
219
                        try {
220
                            JDBCDriverManager.getDefault().addDriver(driver);
220
                            JDBCDriverManager.getDefault().addDriver(driver);
221
                        } catch (DatabaseException e) {
221
                        } catch (DatabaseException e) {
222
                            ErrorManager.getDefault().notify(e);
222
                            ErrorManager.getDefault().dangerousNotify(e);
223
                        }
223
                        }
224
                    }
224
                    }
225
                }
225
                }
(-)db/src/org/netbeans/modules/db/explorer/DerbyConectionEventListener.java (-1 / +1 lines)
Lines 82-88 Link Here
82
            DbDriverManager.getDefault().getSameDriverConnection(conn, "jdbc:derby:;shutdown=true", new Properties()); // NOI18N
82
            DbDriverManager.getDefault().getSameDriverConnection(conn, "jdbc:derby:;shutdown=true", new Properties()); // NOI18N
83
        } catch (SQLException e) {
83
        } catch (SQLException e) {
84
            if (!DERBY_SYSTEM_SHUTDOWN_STATE.equals(e.getSQLState())) { // NOI18N
84
            if (!DERBY_SYSTEM_SHUTDOWN_STATE.equals(e.getSQLState())) { // NOI18N
85
                ErrorManager.getDefault().notify(e);
85
                ErrorManager.getDefault().dangerousNotify(e);
86
            }
86
            }
87
        }
87
        }
88
    }
88
    }
(-)db/src/org/netbeans/modules/db/explorer/dlg/AddDriverDialog.java (-1 / +1 lines)
Lines 82-88 Link Here
82
                try {
82
                try {
83
                    fileName = new File(new URI(urls[i].toExternalForm())).getAbsolutePath();
83
                    fileName = new File(new URI(urls[i].toExternalForm())).getAbsolutePath();
84
                } catch (URISyntaxException e) {
84
                } catch (URISyntaxException e) {
85
                    ErrorManager.getDefault().notify(e);
85
                    ErrorManager.getDefault().dangerousNotify(e);
86
                    fileName = null;
86
                    fileName = null;
87
                }
87
                }
88
            } else {
88
            } else {
(-)db/src/org/netbeans/modules/db/explorer/driver/JDBCDriverConvertor.java (-1 / +1 lines)
Lines 221-227 Link Here
221
                }
221
                }
222
                create(drv);
222
                create(drv);
223
            } catch (Exception ex) {
223
            } catch (Exception ex) {
224
                ErrorManager.getDefault().notify(ex);
224
                ErrorManager.getDefault().dangerousNotify(ex);
225
            }
225
            }
226
            try {
226
            try {
227
                children[i].delete();
227
                children[i].delete();
(-)db/src/org/netbeans/modules/db/explorer/infos/DriverListNodeInfo.java (-1 / +1 lines)
Lines 42-48 Link Here
42
                    try {
42
                    try {
43
                        refreshChildren();
43
                        refreshChildren();
44
                    } catch (DatabaseException ex) {
44
                    } catch (DatabaseException ex) {
45
                        ErrorManager.getDefault().notify(ex);
45
                        ErrorManager.getDefault().dangerousNotify(ex);
46
                    }
46
                    }
47
                }
47
                }
48
            });
48
            });
(-)diff/src/org/netbeans/modules/diff/DiffAction.java (-1 / +1 lines)
Lines 181-187 Link Here
181
                ph.finish();
181
                ph.finish();
182
            }
182
            }
183
        } catch (IOException ioex) {
183
        } catch (IOException ioex) {
184
            ErrorManager.getDefault().notify(ioex);
184
            ErrorManager.getDefault().dangerousNotify(ioex);
185
            return ;
185
            return ;
186
        } finally {
186
        } finally {
187
            try {
187
            try {
(-)diff/src/org/netbeans/modules/diff/EncodedReaderFactory.java (-1 / +1 lines)
Lines 282-288 Link Here
282
                fnfex.initCause(ioex);
282
                fnfex.initCause(ioex);
283
                throw fnfex;
283
                throw fnfex;
284
            } catch (BadLocationException blex) { // Something wrong???
284
            } catch (BadLocationException blex) { // Something wrong???
285
                ErrorManager.getDefault().notify(blex);
285
                ErrorManager.getDefault().dangerousNotify(blex);
286
            } finally {
286
            } finally {
287
                if (stream != null) {
287
                if (stream != null) {
288
                    try { stream.close(); } catch (IOException e) {}
288
                    try { stream.close(); } catch (IOException e) {}
(-)diff/src/org/netbeans/modules/diff/PatchAction.java (-3 / +3 lines)
Lines 324-330 Link Here
324
        try {
324
        try {
325
            tmp = FileUtil.normalizeFile(File.createTempFile("patch", "tmp"));
325
            tmp = FileUtil.normalizeFile(File.createTempFile("patch", "tmp"));
326
        } catch (IOException ioex) {
326
        } catch (IOException ioex) {
327
            ErrorManager.getDefault().notify(ioex);
327
            ErrorManager.getDefault().dangerousNotify(ioex);
328
            return false;
328
            return false;
329
        }
329
        }
330
        tmp.deleteOnExit();
330
        tmp.deleteOnExit();
Lines 352-358 Link Here
352
        try {
352
        try {
353
            FileUtil.copy(in = new FileInputStream(tmp), out = fo.getOutputStream(lock = fo.lock()));
353
            FileUtil.copy(in = new FileInputStream(tmp), out = fo.getOutputStream(lock = fo.lock()));
354
        } catch (IOException ioex) {
354
        } catch (IOException ioex) {
355
            ErrorManager.getDefault().notify(ErrorManager.getDefault().annotate(ioex,
355
            ErrorManager.getDefault().dangerousNotify(ErrorManager.getDefault().annotate(ioex,
356
                NbBundle.getMessage(PatchAction.class, "EXC_CopyOfAppliedPatchFailed",
356
                NbBundle.getMessage(PatchAction.class, "EXC_CopyOfAppliedPatchFailed",
357
                                    fo.getNameExt())));
357
                                    fo.getNameExt())));
358
            return false;
358
            return false;
Lines 413-419 Link Here
413
            }
413
            }
414
        }
414
        }
415
        if (filenames.length()>0)
415
        if (filenames.length()>0)
416
            ErrorManager.getDefault().notify(
416
            ErrorManager.getDefault().dangerousNotify(
417
                ErrorManager.getDefault().annotate(new IOException(),
417
                ErrorManager.getDefault().annotate(new IOException(),
418
                    NbBundle.getMessage(PatchAction.class, 
418
                    NbBundle.getMessage(PatchAction.class, 
419
                        "EXC_CannotRemoveBackup", filenames, exceptions)));
419
                        "EXC_CannotRemoveBackup", filenames, exceptions)));
(-)diff/src/org/netbeans/modules/diff/builtin/DefaultDiffBeanInfo.java (-1 / +1 lines)
Lines 57-63 Link Here
57
            showDiffSelector.setShortDescription (NbBundle.getMessage(DefaultDiffBeanInfo.class, "HINT_showDiffSelector"));
57
            showDiffSelector.setShortDescription (NbBundle.getMessage(DefaultDiffBeanInfo.class, "HINT_showDiffSelector"));
58
            desc = new PropertyDescriptor[] { showDiffSelector };
58
            desc = new PropertyDescriptor[] { showDiffSelector };
59
        } catch (IntrospectionException ex) {
59
        } catch (IntrospectionException ex) {
60
            org.openide.ErrorManager.getDefault().notify(ex);
60
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
61
            desc = null;
61
            desc = null;
62
        }
62
        }
63
        return desc;
63
        return desc;
(-)diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffComponent.java (-1 / +1 lines)
Lines 146-152 Link Here
146
            setSource1(r1);
146
            setSource1(r1);
147
            setSource2(r2);
147
            setSource2(r2);
148
        } catch (IOException ioex) {
148
        } catch (IOException ioex) {
149
            org.openide.ErrorManager.getDefault().notify(ioex);
149
            org.openide.ErrorManager.getDefault().dangerousNotify(ioex);
150
        }
150
        }
151
        setSource1Title(title1);
151
        setSource1Title(title1);
152
        setSource2Title(title2);
152
        setSource2Title(title2);
(-)diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffPanel.java (-3 / +3 lines)
Lines 470-476 Link Here
470
            jEditorPane1.setCaretPosition(off1);
470
            jEditorPane1.setCaretPosition(off1);
471
            jEditorPane2.setCaretPosition(off2);
471
            jEditorPane2.setCaretPosition(off2);
472
        } catch (IndexOutOfBoundsException ex) {
472
        } catch (IndexOutOfBoundsException ex) {
473
            ErrorManager.getDefault().notify(ex);
473
            ErrorManager.getDefault().dangerousNotify(ex);
474
        }
474
        }
475
475
476
        if (ypos < p1.y || ypos + ((diffLength + padding)*totalHeight)/totalLines > p1.y + viewHeight) {
476
        if (ypos < p1.y || ypos + ((diffLength + padding)*totalHeight)/totalLines > p1.y + viewHeight) {
Lines 854-860 Link Here
854
            } catch (IndexOutOfBoundsException ex) {
854
            } catch (IndexOutOfBoundsException ex) {
855
                // diagnostics
855
                // diagnostics
856
                ErrorManager.getDefault().annotate(ex,  "#67631 reappreared. Please reopen with details.");   // NOI18N
856
                ErrorManager.getDefault().annotate(ex,  "#67631 reappreared. Please reopen with details.");   // NOI18N
857
                ErrorManager.getDefault().notify(ex);
857
                ErrorManager.getDefault().dangerousNotify(ex);
858
            }
858
            }
859
        }
859
        }
860
        //doc.setParagraphAttributes(offset, 100, s, true);
860
        //doc.setParagraphAttributes(offset, 100, s, true);
Lines 901-907 Link Here
901
        try {
901
        try {
902
            doc.insertString(offset, insStr, null);
902
            doc.insertString(offset, insStr, null);
903
        } catch (BadLocationException e) {
903
        } catch (BadLocationException e) {
904
            org.openide.ErrorManager.getDefault().notify(e);
904
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
905
        }
905
        }
906
        //initScrollBars();
906
        //initScrollBars();
907
    }
907
    }
(-)diff/src/org/netbeans/modules/diff/builtin/visualizer/DiffViewImpl.java (-5 / +5 lines)
Lines 170-176 Link Here
170
                        if (source1 != null) setSource1(new StringReader(source1));
170
                        if (source1 != null) setSource1(new StringReader(source1));
171
                        if (source2 != null) setSource2(new StringReader(source2));
171
                        if (source2 != null) setSource2(new StringReader(source2));
172
                    } catch (IOException ioex) {
172
                    } catch (IOException ioex) {
173
                        org.openide.ErrorManager.getDefault().notify(ioex);
173
                        org.openide.ErrorManager.getDefault().dangerousNotify(ioex);
174
                    }
174
                    }
175
                    insertEmptyLines(true);
175
                    insertEmptyLines(true);
176
                    setDiffHighlight(true);
176
                    setDiffHighlight(true);
Lines 190-199 Link Here
190
            }
190
            }
191
        } catch (InterruptedException e) {
191
        } catch (InterruptedException e) {
192
            ErrorManager err = ErrorManager.getDefault();
192
            ErrorManager err = ErrorManager.getDefault();
193
            err.notify(e);
193
            err.dangerousNotify(e);
194
        } catch (InvocationTargetException e) {
194
        } catch (InvocationTargetException e) {
195
            ErrorManager err = ErrorManager.getDefault();
195
            ErrorManager err = ErrorManager.getDefault();
196
            err.notify(e);
196
            err.dangerousNotify(e);
197
        }
197
        }
198
198
199
    }
199
    }
Lines 522-528 Link Here
522
            jEditorPane1.setCaretPosition(off1);
522
            jEditorPane1.setCaretPosition(off1);
523
            jEditorPane2.setCaretPosition(off2);
523
            jEditorPane2.setCaretPosition(off2);
524
        } catch (IndexOutOfBoundsException ex) {
524
        } catch (IndexOutOfBoundsException ex) {
525
            ErrorManager.getDefault().notify(ex);
525
            ErrorManager.getDefault().dangerousNotify(ex);
526
        }
526
        }
527
527
528
        if (ypos < p1.y || ypos + ((diffLength + padding)*totalHeight)/totalLines > p1.y + viewHeight) {
528
        if (ypos < p1.y || ypos + ((diffLength + padding)*totalHeight)/totalLines > p1.y + viewHeight) {
Lines 790-796 Link Here
790
        try {
790
        try {
791
            doc.insertString(offset, insStr, null);
791
            doc.insertString(offset, insStr, null);
792
        } catch (BadLocationException e) {
792
        } catch (BadLocationException e) {
793
            org.openide.ErrorManager.getDefault().notify(e);
793
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
794
        }
794
        }
795
    }
795
    }
796
    
796
    
(-)diff/src/org/netbeans/modules/diff/builtin/visualizer/GraphicalDiffVisualizerBeanInfo.java (-1 / +1 lines)
Lines 63-69 Link Here
63
            colorChanged.setShortDescription (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "HINT_colorChanged"));
63
            colorChanged.setShortDescription (NbBundle.getMessage(GraphicalDiffVisualizerBeanInfo.class, "HINT_colorChanged"));
64
            desc = new PropertyDescriptor[] { colorAdded, colorMissing, colorChanged };
64
            desc = new PropertyDescriptor[] { colorAdded, colorMissing, colorChanged };
65
        } catch (IntrospectionException ex) {
65
        } catch (IntrospectionException ex) {
66
            org.openide.ErrorManager.getDefault().notify(ex);
66
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
67
            desc = null;
67
            desc = null;
68
        }
68
        }
69
        return desc;
69
        return desc;
(-)diff/src/org/netbeans/modules/diff/builtin/visualizer/TextDiffVisualizerBeanInfo.java (-1 / +1 lines)
Lines 60-66 Link Here
60
            contextNumLines.setShortDescription (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "HINT_contextNumLines"));
60
            contextNumLines.setShortDescription (NbBundle.getMessage(TextDiffVisualizerBeanInfo.class, "HINT_contextNumLines"));
61
            desc = new PropertyDescriptor[] { contextMode, contextNumLines };//diffCommand };
61
            desc = new PropertyDescriptor[] { contextMode, contextNumLines };//diffCommand };
62
        } catch (IntrospectionException ex) {
62
        } catch (IntrospectionException ex) {
63
            org.openide.ErrorManager.getDefault().notify(ex);
63
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
64
            desc = null;
64
            desc = null;
65
        }
65
        }
66
        return desc;
66
        return desc;
(-)diff/src/org/netbeans/modules/diff/cmdline/CmdlineDiffProviderBeanInfo.java (-1 / +1 lines)
Lines 56-62 Link Here
56
            diffCommand.setShortDescription (NbBundle.getMessage(CmdlineDiffProviderBeanInfo.class, "HINT_diffCmd"));
56
            diffCommand.setShortDescription (NbBundle.getMessage(CmdlineDiffProviderBeanInfo.class, "HINT_diffCmd"));
57
            desc = new PropertyDescriptor[] { diffCommand };
57
            desc = new PropertyDescriptor[] { diffCommand };
58
        } catch (IntrospectionException ex) {
58
        } catch (IntrospectionException ex) {
59
            org.openide.ErrorManager.getDefault().notify(ex);
59
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
60
            desc = null;
60
            desc = null;
61
        }
61
        }
62
        return desc;
62
        return desc;
(-)diff/src/org/netbeans/modules/merge/builtin/visualizer/GraphicalMergeVisualizerBeanInfo.java (-1 / +1 lines)
Lines 63-69 Link Here
63
            colorOtherConflict.setShortDescription (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "HINT_colorOtherConflict"));
63
            colorOtherConflict.setShortDescription (NbBundle.getMessage(GraphicalMergeVisualizerBeanInfo.class, "HINT_colorOtherConflict"));
64
            desc = new PropertyDescriptor[] { colorUnresolvedConflict, colorResolvedConflict, colorOtherConflict };
64
            desc = new PropertyDescriptor[] { colorUnresolvedConflict, colorResolvedConflict, colorOtherConflict };
65
        } catch (IntrospectionException ex) {
65
        } catch (IntrospectionException ex) {
66
            org.openide.ErrorManager.getDefault().notify(ex);
66
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
67
            desc = null;
67
            desc = null;
68
        }
68
        }
69
        return desc;
69
        return desc;
(-)diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeControl.java (-1 / +1 lines)
Lines 93-99 Link Here
93
            panel.setSource2(source2.createReader());
93
            panel.setSource2(source2.createReader());
94
            panel.setResultSource(new java.io.StringReader(""));
94
            panel.setResultSource(new java.io.StringReader(""));
95
        } catch (IOException ioex) {
95
        } catch (IOException ioex) {
96
            org.openide.ErrorManager.getDefault().notify(ioex);
96
            org.openide.ErrorManager.getDefault().dangerousNotify(ioex);
97
        }
97
        }
98
        this.colorUnresolvedConflict = colorUnresolvedConflict;
98
        this.colorUnresolvedConflict = colorUnresolvedConflict;
99
        this.colorResolvedConflict = colorResolvedConflict;
99
        this.colorResolvedConflict = colorResolvedConflict;
(-)diff/src/org/netbeans/modules/merge/builtin/visualizer/MergeDialogComponent.java (-1 / +1 lines)
Lines 235-241 Link Here
235
                    ioException = ioEx;
235
                    ioException = ioEx;
236
                }
236
                }
237
                if (ioException != null) {
237
                if (ioException != null) {
238
                    ErrorManager.getDefault().notify(ioException);
238
                    ErrorManager.getDefault().dangerousNotify(ioException);
239
                    // cancel the close - there was an error on save
239
                    // cancel the close - there was an error on save
240
                    return ;
240
                    return ;
241
                }
241
                }
(-)diff/src/org/netbeans/modules/merge/builtin/visualizer/MergePanel.java (-5 / +5 lines)
Lines 1077-1083 Link Here
1077
        try {
1077
        try {
1078
            copy(doc1, line1, line2, doc2, line3);
1078
            copy(doc1, line1, line2, doc2, line3);
1079
        } catch (BadLocationException e) {
1079
        } catch (BadLocationException e) {
1080
            org.openide.ErrorManager.getDefault().notify(e);
1080
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
1081
        }
1081
        }
1082
    }
1082
    }
1083
    
1083
    
Lines 1094-1100 Link Here
1094
        try {
1094
        try {
1095
            copy(doc1, line1, line2, doc2, line3);
1095
            copy(doc1, line1, line2, doc2, line3);
1096
        } catch (BadLocationException e) {
1096
        } catch (BadLocationException e) {
1097
            org.openide.ErrorManager.getDefault().notify(e);
1097
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
1098
        }
1098
        }
1099
    }
1099
    }
1100
    
1100
    
Lines 1143-1149 Link Here
1143
        try {
1143
        try {
1144
            replace(doc1, line1, line2, doc2, line3, line4);
1144
            replace(doc1, line1, line2, doc2, line3, line4);
1145
        } catch (BadLocationException e) {
1145
        } catch (BadLocationException e) {
1146
            org.openide.ErrorManager.getDefault().notify(e);
1146
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
1147
        }
1147
        }
1148
        if (resolvedRightConflictsLineNumbers.contains(conflictLine)) {
1148
        if (resolvedRightConflictsLineNumbers.contains(conflictLine)) {
1149
            resolvedRightConflictsLineNumbers.remove(conflictLine);
1149
            resolvedRightConflictsLineNumbers.remove(conflictLine);
Lines 1174-1180 Link Here
1174
        try {
1174
        try {
1175
            replace(doc1, line1, line2, doc2, line3, line4);
1175
            replace(doc1, line1, line2, doc2, line3, line4);
1176
        } catch (BadLocationException e) {
1176
        } catch (BadLocationException e) {
1177
            org.openide.ErrorManager.getDefault().notify(e);
1177
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
1178
        }
1178
        }
1179
        if (resolvedLeftConflictsLineNumbers.contains(conflictLine)) {
1179
        if (resolvedLeftConflictsLineNumbers.contains(conflictLine)) {
1180
            resolvedLeftConflictsLineNumbers.remove(conflictLine);
1180
            resolvedLeftConflictsLineNumbers.remove(conflictLine);
Lines 1560-1566 Link Here
1560
        try {
1560
        try {
1561
            doc.insertString(offset, insStr, null);
1561
            doc.insertString(offset, insStr, null);
1562
        } catch (BadLocationException e) {
1562
        } catch (BadLocationException e) {
1563
            org.openide.ErrorManager.getDefault().notify(e);
1563
            org.openide.ErrorManager.getDefault().dangerousNotify(e);
1564
        }
1564
        }
1565
        //initScrollBars();
1565
        //initScrollBars();
1566
    }
1566
    }
(-)editor/fold/src/org/netbeans/api/editor/fold/Fold.java (-2 / +2 lines)
Lines 415-421 Link Here
415
            try {
415
            try {
416
                updateGuardedStartPos(evt.getDocument(), getStartOffset());
416
                updateGuardedStartPos(evt.getDocument(), getStartOffset());
417
            } catch (BadLocationException e) {
417
            } catch (BadLocationException e) {
418
                ErrorManager.getDefault().notify(e);
418
                ErrorManager.getDefault().dangerousNotify(e);
419
            }
419
            }
420
        }
420
        }
421
    }
421
    }
Lines 429-435 Link Here
429
                updateGuardedEndPos(evt.getDocument(), getEndOffset());
429
                updateGuardedEndPos(evt.getDocument(), getEndOffset());
430
            }
430
            }
431
        } catch (BadLocationException e) {
431
        } catch (BadLocationException e) {
432
            ErrorManager.getDefault().notify(e);
432
            ErrorManager.getDefault().dangerousNotify(e);
433
        }
433
        }
434
    }
434
    }
435
    
435
    
(-)editor/fold/src/org/netbeans/modules/editor/fold/FoldHierarchyExecution.java (-1 / +1 lines)
Lines 181-187 Link Here
181
                null
181
                null
182
            );
182
            );
183
        } catch (BadLocationException e) {
183
        } catch (BadLocationException e) {
184
            ErrorManager.getDefault().notify(e);
184
            ErrorManager.getDefault().dangerousNotify(e);
185
        }
185
        }
186
        
186
        
187
        foldingEnabled = getFoldingEnabledSetting();
187
        foldingEnabled = getFoldingEnabledSetting();
(-)editor/fold/src/org/netbeans/modules/editor/fold/FoldHierarchyTransactionImpl.java (-1 / +1 lines)
Lines 229-235 Link Here
229
            insertCheckEndOffset(execution.getRootFold(), evt);
229
            insertCheckEndOffset(execution.getRootFold(), evt);
230
230
231
        } catch (BadLocationException e) {
231
        } catch (BadLocationException e) {
232
            ErrorManager.getDefault().notify(e);
232
            ErrorManager.getDefault().dangerousNotify(e);
233
        }
233
        }
234
    }
234
    }
235
    
235
    
(-)extbrowser/src/org/netbeans/modules/extbrowser/ExtWebBrowserBeanInfo.java (-2 / +2 lines)
Lines 54-60 Link Here
54
                properties[2].setHidden(true);
54
                properties[2].setHidden(true);
55
55
56
            } catch (IntrospectionException ie) {
56
            } catch (IntrospectionException ie) {
57
                org.openide.ErrorManager.getDefault().notify(ie);
57
                org.openide.ErrorManager.getDefault().dangerousNotify(ie);
58
                return null;
58
                return null;
59
            }
59
            }
60
        } else {
60
        } else {
Lines 67-73 Link Here
67
                properties[0].setShortDescription (NbBundle.getMessage (ExtWebBrowserBeanInfo.class, "HINT_browserExecutable"));
67
                properties[0].setShortDescription (NbBundle.getMessage (ExtWebBrowserBeanInfo.class, "HINT_browserExecutable"));
68
68
69
            } catch (IntrospectionException ie) {
69
            } catch (IntrospectionException ie) {
70
                org.openide.ErrorManager.getDefault().notify(ie);
70
                org.openide.ErrorManager.getDefault().dangerousNotify(ie);
71
                return null;
71
                return null;
72
            }
72
            }
73
        }
73
        }
(-)extbrowser/src/org/netbeans/modules/extbrowser/FirefoxBrowserBeanInfo.java (-1 / +1 lines)
Lines 49-55 Link Here
49
        try {
49
        try {
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
51
        } catch (IntrospectionException ie) {
51
        } catch (IntrospectionException ie) {
52
            ErrorManager.getDefault().notify(ie);
52
            ErrorManager.getDefault().dangerousNotify(ie);
53
            return null;
53
            return null;
54
        }
54
        }
55
    }
55
    }
(-)extbrowser/src/org/netbeans/modules/extbrowser/IExplorerBrowserBeanInfo.java (-1 / +1 lines)
Lines 49-55 Link Here
49
        try {
49
        try {
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
51
        } catch (IntrospectionException ie) {
51
        } catch (IntrospectionException ie) {
52
            ErrorManager.getDefault().notify(ie);
52
            ErrorManager.getDefault().dangerousNotify(ie);
53
            return null;
53
            return null;
54
        }
54
        }
55
    }
55
    }
(-)extbrowser/src/org/netbeans/modules/extbrowser/MozillaBrowserBeanInfo.java (-1 / +1 lines)
Lines 49-55 Link Here
49
        try {
49
        try {
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
51
        } catch (IntrospectionException ie) {
51
        } catch (IntrospectionException ie) {
52
            ErrorManager.getDefault().notify(ie);
52
            ErrorManager.getDefault().dangerousNotify(ie);
53
            return null;
53
            return null;
54
        }
54
        }
55
    }
55
    }
(-)extbrowser/src/org/netbeans/modules/extbrowser/NbDdeBrowserImpl.java (-1 / +1 lines)
Lines 359-365 Link Here
359
                ErrorManager.getDefault ().annotate(ex1, NbBundle.getMessage(NbDdeBrowserImpl.class, "MSG_win_browser_invocation_failed"));
359
                ErrorManager.getDefault ().annotate(ex1, NbBundle.getMessage(NbDdeBrowserImpl.class, "MSG_win_browser_invocation_failed"));
360
                SwingUtilities.invokeLater(new Runnable() {
360
                SwingUtilities.invokeLater(new Runnable() {
361
                    public void run() {
361
                    public void run() {
362
                        ErrorManager.getDefault ().notify (ex1);
362
                        ErrorManager.getDefault ().dangerousNotify (ex1);
363
                    }
363
                    }
364
                });
364
                });
365
            }
365
            }
(-)extbrowser/src/org/netbeans/modules/extbrowser/NetscapeBrowserBeanInfo.java (-1 / +1 lines)
Lines 49-55 Link Here
49
        try {
49
        try {
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
50
            return new BeanInfo[] { Introspector.getBeanInfo (ExtWebBrowser.class) };
51
        } catch (IntrospectionException ie) {
51
        } catch (IntrospectionException ie) {
52
            ErrorManager.getDefault().notify(ie);
52
            ErrorManager.getDefault().dangerousNotify(ie);
53
            return null;
53
            return null;
54
        }
54
        }
55
    }
55
    }
(-)extbrowser/src/org/netbeans/modules/extbrowser/SimpleExtBrowserBeanInfo.java (-1 / +1 lines)
Lines 49-55 Link Here
49
            properties[0].setDisplayName (NbBundle.getMessage (SimpleExtBrowserBeanInfo.class, "PROP_browserExecutable"));
49
            properties[0].setDisplayName (NbBundle.getMessage (SimpleExtBrowserBeanInfo.class, "PROP_browserExecutable"));
50
            properties[0].setShortDescription (NbBundle.getMessage (SimpleExtBrowserBeanInfo.class, "HINT_browserExecutable"));
50
            properties[0].setShortDescription (NbBundle.getMessage (SimpleExtBrowserBeanInfo.class, "HINT_browserExecutable"));
51
        } catch (IntrospectionException ie) {
51
        } catch (IntrospectionException ie) {
52
            org.openide.ErrorManager.getDefault().notify(ie);
52
            org.openide.ErrorManager.getDefault().dangerousNotify(ie);
53
            return null;
53
            return null;
54
        }
54
        }
55
        return properties;
55
        return properties;
(-)extbrowser/src/org/netbeans/modules/extbrowser/SystemDefaultBrowserBeanInfo.java (-1 / +1 lines)
Lines 58-64 Link Here
58
            properties[2].setHidden(true);
58
            properties[2].setHidden(true);
59
59
60
        } catch (IntrospectionException ie) {
60
        } catch (IntrospectionException ie) {
61
            org.openide.ErrorManager.getDefault().notify(ie);
61
            org.openide.ErrorManager.getDefault().dangerousNotify(ie);
62
            return null;
62
            return null;
63
        }
63
        }
64
        
64
        
(-)extbrowser/src/org/netbeans/modules/extbrowser/UnixBrowserImpl.java (-1 / +1 lines)
Lines 155-161 Link Here
155
            ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, ex);
155
            ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, ex);
156
        }
156
        }
157
        catch (java.lang.Exception ex) {
157
        catch (java.lang.Exception ex) {
158
            ErrorManager.getDefault ().notify (ex);
158
            ErrorManager.getDefault ().dangerousNotify (ex);
159
        }
159
        }
160
    }
160
    }
161
   
161
   
(-)form/src/org/netbeans/modules/form/FormEditor.java (-1 / +1 lines)
Lines 414-420 Link Here
414
                if (annotations != null) {
414
                if (annotations != null) {
415
                    for (int i=0; i < annotations.length; i++) {
415
                    for (int i=0; i < annotations.length; i++) {
416
                        int s = annotations[i].getSeverity();
416
                        int s = annotations[i].getSeverity();
417
                        if (s == ErrorManager.UNKNOWN)
417
                        if (s == ErrorManager.DangerousUnknownConstant)
418
                            s = ErrorManager.EXCEPTION;
418
                            s = ErrorManager.EXCEPTION;
419
                        if (s > severity)
419
                        if (s > severity)
420
                            severity = s;
420
                            severity = s;
(-)html/editor/src/org/netbeans/modules/html/editor/folding/HTMLFoldManager.java (-4 / +4 lines)
Lines 439-445 Link Here
439
                            }catch(BadLocationException ble) {
439
                            }catch(BadLocationException ble) {
440
                                //when the document is closing the hierarchy returns different empty document, grrrr
440
                                //when the document is closing the hierarchy returns different empty document, grrrr
441
                                Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
441
                                Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
442
                                if(fhDoc.getLength() > 0) ErrorManager.getDefault().notify(ble);
442
                                if(fhDoc.getLength() > 0) ErrorManager.getDefault().dangerousNotify(ble);
443
                            }finally {
443
                            }finally {
444
                                fhTran.commit();
444
                                fhTran.commit();
445
                            }
445
                            }
Lines 461-477 Link Here
461
            
461
            
462
            //when the document is closing the hierarchy returns different empty document, grrrr
462
            //when the document is closing the hierarchy returns different empty document, grrrr
463
            Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
463
            Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
464
            if(fhDoc.getLength() > 0) ErrorManager.getDefault().notify(e);
464
            if(fhDoc.getLength() > 0) ErrorManager.getDefault().dangerousNotify(e);
465
        }catch(InterruptedException ie) {
465
        }catch(InterruptedException ie) {
466
            //do nothing
466
            //do nothing
467
        }catch(InvocationTargetException ite) {
467
        }catch(InvocationTargetException ite) {
468
            ErrorManager.getDefault().notify(ite);
468
            ErrorManager.getDefault().dangerousNotify(ite);
469
        }catch(ParsingCancelledException pce) {
469
        }catch(ParsingCancelledException pce) {
470
            throw new ParsingCancelledException();
470
            throw new ParsingCancelledException();
471
        }catch(Exception e) {
471
        }catch(Exception e) {
472
            //do not let exceptions like NPEs to fall through to the timer's task run method.
472
            //do not let exceptions like NPEs to fall through to the timer's task run method.
473
            //if this happens the timer is cancelled and cannot be used anymore
473
            //if this happens the timer is cancelled and cannot be used anymore
474
            ErrorManager.getDefault().notify(e);
474
            ErrorManager.getDefault().dangerousNotify(e);
475
        } finally {
475
        } finally {
476
            if(debug) HTMLFoldUtils.printFolds(getOperation()); //DEBUG - print folds structure into console
476
            if(debug) HTMLFoldUtils.printFolds(getOperation()); //DEBUG - print folds structure into console
477
        }
477
        }
(-)java/editor/lib/src/org/netbeans/editor/ext/java/JavaDeclarationProcessor.java (-1 / +1 lines)
Lines 321-327 Link Here
321
        try {
321
        try {
322
            return sup.getDocument().getText(offset, length);
322
            return sup.getDocument().getText(offset, length);
323
        } catch (BadLocationException e) {
323
        } catch (BadLocationException e) {
324
            ErrorManager.getDefault().notify(e);
324
            ErrorManager.getDefault().dangerousNotify(e);
325
            return "";
325
            return "";
326
        }
326
        }
327
    }
327
    }
(-)java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/J2SELogicalViewProvider.java (-1 / +1 lines)
Lines 355-361 Link Here
355
                    fileSystemListeners.put(fs, fsl);
355
                    fileSystemListeners.put(fs, fsl);
356
                } catch (FileStateInvalidException e) {
356
                } catch (FileStateInvalidException e) {
357
                    ErrorManager err = ErrorManager.getDefault();
357
                    ErrorManager err = ErrorManager.getDefault();
358
                    err.annotate(e, ErrorManager.UNKNOWN, "Cannot get " + fo + " filesystem, ignoring...", null, null, null); // NO18N
358
                    err.annotate(e, ErrorManager.DangerousUnknownConstant, "Cannot get " + fo + " filesystem, ignoring...", null, null, null); // NO18N
359
                    err.notify(ErrorManager.INFORMATIONAL, e);
359
                    err.notify(ErrorManager.INFORMATIONAL, e);
360
                }
360
                }
361
            }
361
            }
(-)java/javacore/src/org/netbeans/modules/javacore/parser/ASTProvider.java (-1 / +1 lines)
Lines 555-561 Link Here
555
                    writer.close();
555
                    writer.close();
556
                }
556
                }
557
            } catch (IOException ioe) {
557
            } catch (IOException ioe) {
558
                ErrorManager.getDefault().annotate(ioe, ErrorManager.UNKNOWN, "Error when writing parser dump file!", null, null, null); // NOI18N
558
                ErrorManager.getDefault().annotate(ioe, ErrorManager.DangerousUnknownConstant, "Error when writing parser dump file!", null, null, null); // NOI18N
559
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
559
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ioe);
560
                name = null;
560
                name = null;
561
            }
561
            }
(-)java/platform/src/org/netbeans/modules/java/platform/DefaultJavaPlatformProvider.java (-2 / +2 lines)
Lines 77-86 Link Here
77
                    }
77
                    }
78
                }
78
                }
79
            }catch (ClassNotFoundException cnf) {
79
            }catch (ClassNotFoundException cnf) {
80
                ErrorManager.getDefault().notify (cnf);
80
                ErrorManager.getDefault().dangerousNotify (cnf);
81
            }
81
            }
82
            catch (IOException ioe) {
82
            catch (IOException ioe) {
83
                ErrorManager.getDefault().notify (ioe);
83
                ErrorManager.getDefault().dangerousNotify (ioe);
84
            }
84
            }
85
        }
85
        }
86
        return (JavaPlatform[])platforms.toArray(new JavaPlatform[platforms.size()]);
86
        return (JavaPlatform[])platforms.toArray(new JavaPlatform[platforms.size()]);
(-)java/platform/src/org/netbeans/modules/java/platform/ui/PlatformsCustomizer.java (-4 / +4 lines)
Lines 284-290 Link Here
284
            this.getChildren().refreshPlatforms();
284
            this.getChildren().refreshPlatforms();
285
            this.expandPlatforms(null);
285
            this.expandPlatforms(null);
286
        } catch (IOException ioe) {
286
        } catch (IOException ioe) {
287
            ErrorManager.getDefault().notify (ioe);
287
            ErrorManager.getDefault().dangerousNotify (ioe);
288
        }
288
        }
289
    }//GEN-LAST:event_removePlatform
289
    }//GEN-LAST:event_removePlatform
290
290
Lines 314-323 Link Here
314
                dlg.dispose();
314
                dlg.dispose();
315
            }
315
            }
316
        } catch (DataObjectNotFoundException dfne) {
316
        } catch (DataObjectNotFoundException dfne) {
317
            ErrorManager.getDefault().notify (dfne);
317
            ErrorManager.getDefault().dangerousNotify (dfne);
318
        }
318
        }
319
        catch (IOException ioe) {
319
        catch (IOException ioe) {
320
            ErrorManager.getDefault().notify (ioe);
320
            ErrorManager.getDefault().dangerousNotify (ioe);
321
        }
321
        }
322
    }//GEN-LAST:event_addNewPlatform
322
    }//GEN-LAST:event_addNewPlatform
323
323
Lines 604-610 Link Here
604
                            ErrorManager.getDefault().log ("Platform node for : "+node.getDisplayName()+" has no platform in its lookup.");   //NOI18N
604
                            ErrorManager.getDefault().log ("Platform node for : "+node.getDisplayName()+" has no platform in its lookup.");   //NOI18N
605
                        }                    
605
                        }                    
606
                    }catch (DataObjectNotFoundException e) {
606
                    }catch (DataObjectNotFoundException e) {
607
                        ErrorManager.getDefault().notify(e);
607
                        ErrorManager.getDefault().dangerousNotify(e);
608
                    }
608
                    }
609
                 }                                    
609
                 }                                    
610
                List keys = new ArrayList (categories.values());
610
                List keys = new ArrayList (categories.values());
(-)java/src/org/netbeans/modules/java/IndentFileEntry.java (-1 / +1 lines)
Lines 188-194 Link Here
188
	    ErrorManager.getDefault().annotate(
188
	    ErrorManager.getDefault().annotate(
189
		ex, ErrorManager.WARNING, "Indentation engine error",  // NOI18N
189
		ex, ErrorManager.WARNING, "Indentation engine error",  // NOI18N
190
                    Util.getString("EXMSG_IndentationEngineError"), ex, null);
190
                    Util.getString("EXMSG_IndentationEngineError"), ex, null);
191
            ErrorManager.getDefault().notify(ex);
191
            ErrorManager.getDefault().dangerousNotify(ex);
192
            return text;
192
            return text;
193
        }
193
        }
194
    }
194
    }
(-)java/src/org/netbeans/modules/java/JavaDataLoaderBeanInfo.java (-1 / +1 lines)
Lines 30-36 Link Here
30
        try {
30
        try {
31
            return new BeanInfo[] { Introspector.getBeanInfo (MultiFileLoader.class) };
31
            return new BeanInfo[] { Introspector.getBeanInfo (MultiFileLoader.class) };
32
        } catch (IntrospectionException ie) {
32
        } catch (IntrospectionException ie) {
33
            ErrorManager.getDefault().notify(ie);
33
            ErrorManager.getDefault().dangerousNotify(ie);
34
            return null;
34
            return null;
35
        }
35
        }
36
    }
36
    }
(-)java/src/org/netbeans/modules/java/Util.java (-1 / +1 lines)
Lines 115-121 Link Here
115
    * @param msg is ignored
115
    * @param msg is ignored
116
    */
116
    */
117
    private static void notifyException(Throwable t, String msg) {
117
    private static void notifyException(Throwable t, String msg) {
118
        getErrorManager().notify(t);
118
        getErrorManager().dangerousNotify(t);
119
    }
119
    }
120
120
121
121
(-)java/src/org/netbeans/modules/java/bridge/ElementImpl.java (-1 / +1 lines)
Lines 879-885 Link Here
879
            try {
879
            try {
880
                edSupport.openDocument();
880
                edSupport.openDocument();
881
            } catch (IOException e) {
881
            } catch (IOException e) {
882
                ErrorManager.getDefault().notify(e);
882
                ErrorManager.getDefault().dangerousNotify(e);
883
            }
883
            }
884
        }
884
        }
885
    }    
885
    }    
(-)java/src/org/netbeans/modules/java/bridge/MemberElementImpl.java (-1 / +1 lines)
Lines 463-469 Link Here
463
                try {
463
                try {
464
                    javadoc.changeJavaDocText(javadocText, true);
464
                    javadoc.changeJavaDocText(javadocText, true);
465
                } catch (SourceException ex) {
465
                } catch (SourceException ex) {
466
                    ErrorManager.getDefault().notify(ex);
466
                    ErrorManager.getDefault().dangerousNotify(ex);
467
                }
467
                }
468
            }
468
            }
469
        } catch (InvalidObjectException e) {
469
        } catch (InvalidObjectException e) {
(-)java/src/org/netbeans/modules/java/parser/ParsingSupport.java (-1 / +1 lines)
Lines 530-536 Link Here
530
                savedException = new SourceException(e.getLocalizedMessage());
530
                savedException = new SourceException(e.getLocalizedMessage());
531
                parsingEnv.annotateThrowable(savedException, e);
531
                parsingEnv.annotateThrowable(savedException, e);
532
                parsingEnv.annotateThrowable(savedException, "Parser error", false); // NOI18N
532
                parsingEnv.annotateThrowable(savedException, "Parser error", false); // NOI18N
533
		        org.openide.ErrorManager.getDefault().notify(e);
533
		        org.openide.ErrorManager.getDefault().dangerousNotify(e);
534
                resultStatus = SourceElement.STATUS_ERROR;
534
                resultStatus = SourceElement.STATUS_ERROR;
535
            } finally {
535
            } finally {
536
                stage--;
536
                stage--;
(-)java/src/org/netbeans/modules/java/settings/JavaSettingsBeanInfo.java (-1 / +1 lines)
Lines 71-77 Link Here
71
            desc[index].setShortDescription(JavaSettings.getString("HINT_SHOW_OVERRIDING"));
71
            desc[index].setShortDescription(JavaSettings.getString("HINT_SHOW_OVERRIDING"));
72
            return desc;
72
            return desc;
73
        } catch (IntrospectionException ex) {
73
        } catch (IntrospectionException ex) {
74
	    ErrorManager.getDefault().notify(ex);
74
	    ErrorManager.getDefault().dangerousNotify(ex);
75
            return null;
75
            return null;
76
        }
76
        }
77
    }
77
    }
(-)java/src/org/netbeans/modules/java/settings/JavaSynchronizationSettingsBeanInfo.java (-1 / +1 lines)
Lines 55-61 Link Here
55
	    return desc;
55
	    return desc;
56
        }
56
        }
57
        catch (IntrospectionException ex) {
57
        catch (IntrospectionException ex) {
58
	    ErrorManager.getDefault().notify(ex);
58
	    ErrorManager.getDefault().dangerousNotify(ex);
59
	    return null;
59
	    return null;
60
        }
60
        }
61
    }
61
    }
(-)java/src/org/netbeans/modules/java/tools/JMIInheritanceSupport.java (-1 / +1 lines)
Lines 177-183 Link Here
177
            addMethod(newMethod);
177
            addMethod(newMethod);
178
            return newMethod;
178
            return newMethod;
179
        } catch (InvalidObjectException e) {
179
        } catch (InvalidObjectException e) {
180
            ErrorManager.getDefault().notify(e);
180
            ErrorManager.getDefault().dangerousNotify(e);
181
            return null;
181
            return null;
182
        }
182
        }
183
    }
183
    }
(-)java/src/org/netbeans/modules/java/tools/OverridePanel2.java (-1 / +1 lines)
Lines 307-313 Link Here
307
        try {
307
        try {
308
            getExplorerManager().setSelectedNodes((Node []) selectedNodes.toArray(new Node[selectedNodes.size()]));
308
            getExplorerManager().setSelectedNodes((Node []) selectedNodes.toArray(new Node[selectedNodes.size()]));
309
        } catch (PropertyVetoException e) {
309
        } catch (PropertyVetoException e) {
310
            ErrorManager.getDefault().notify(e);
310
            ErrorManager.getDefault().dangerousNotify(e);
311
        }
311
        }
312
        
312
        
313
        getExplorerManager().addPropertyChangeListener(this);
313
        getExplorerManager().addPropertyChangeListener(this);
(-)java/src/org/netbeans/modules/java/ui/nodes/editors/IdentifierArrayEditor.java (-1 / +1 lines)
Lines 120-126 Link Here
120
                JavaMetamodel.getDefaultRepository().endTrans();
120
                JavaMetamodel.getDefaultRepository().endTrans();
121
            }
121
            }
122
        } catch (JmiException ex) {
122
        } catch (JmiException ex) {
123
            ErrorManager.getDefault().notify(ex);
123
            ErrorManager.getDefault().dangerousNotify(ex);
124
        }
124
        }
125
125
126
        MultipartId[] ret = new MultipartId[list.size()];
126
        MultipartId[] ret = new MultipartId[list.size()];
(-)java/src/org/netbeans/modules/java/ui/nodes/editors/MethodParameterArrayEditor.java (-3 / +3 lines)
Lines 83-89 Link Here
83
                    JavaMetamodel.getDefaultRepository().endTrans();
83
                    JavaMetamodel.getDefaultRepository().endTrans();
84
                }
84
                }
85
            } catch (JmiException ex) {
85
            } catch (JmiException ex) {
86
                ErrorManager.getDefault().notify(ex);
86
                ErrorManager.getDefault().dangerousNotify(ex);
87
            }
87
            }
88
        }
88
        }
89
        return text;
89
        return text;
Lines 242-248 Link Here
242
                                JavaMetamodel.getDefaultRepository().endTrans();
242
                                JavaMetamodel.getDefaultRepository().endTrans();
243
                            }
243
                            }
244
                        } catch (JmiException ex) {
244
                        } catch (JmiException ex) {
245
                            ErrorManager.getDefault().notify(ex);
245
                            ErrorManager.getDefault().dangerousNotify(ex);
246
                        }
246
                        }
247
                    }
247
                    }
248
                    return comp;
248
                    return comp;
Lines 365-371 Link Here
365
                                JavaMetamodel.getDefaultRepository().endTrans();
365
                                JavaMetamodel.getDefaultRepository().endTrans();
366
                            }
366
                            }
367
                        } catch (JmiException ex) {
367
                        } catch (JmiException ex) {
368
                            ErrorManager.getDefault().notify(ex);
368
                            ErrorManager.getDefault().dangerousNotify(ex);
369
                            return null;
369
                            return null;
370
                        }
370
                        }
371
                    }
371
                    }
(-)java/src/org/netbeans/modules/java/ui/nodes/editors/TypeParameterArrayEditor.java (-1 / +1 lines)
Lines 50-56 Link Here
50
                JavaMetamodel.getDefaultRepository().endTrans();
50
                JavaMetamodel.getDefaultRepository().endTrans();
51
            }
51
            }
52
        } catch (JmiException e) {
52
        } catch (JmiException e) {
53
            ErrorManager.getDefault().notify(e);
53
            ErrorManager.getDefault().dangerousNotify(e);
54
        }
54
        }
55
        return text.toString();
55
        return text.toString();
56
    }
56
    }
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/AnnotationTypeCustomizer.java (-4 / +4 lines)
Lines 195-201 Link Here
195
                x, ErrorManager.USER, null, 
195
                x, ErrorManager.USER, null, 
196
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
196
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
197
                null, null);
197
                null, null);
198
            ErrorManager.getDefault().notify (x);
198
            ErrorManager.getDefault().dangerousNotify (x);
199
        } else if (oldName.equals(newName)) {
199
        } else if (oldName.equals(newName)) {
200
            return; // nothing to change
200
            return; // nothing to change
201
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
201
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
Lines 204-223 Link Here
204
                x, ErrorManager.USER, null, 
204
                x, ErrorManager.USER, null, 
205
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
205
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
206
                null, null);
206
                null, null);
207
            ErrorManager.getDefault().notify (x);
207
            ErrorManager.getDefault().dangerousNotify (x);
208
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
208
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
209
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
209
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
210
            ErrorManager.getDefault().annotate(
210
            ErrorManager.getDefault().annotate(
211
                x, ErrorManager.USER, null, 
211
                x, ErrorManager.USER, null, 
212
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
212
                NbBundle.getMessage(AnnotationTypeCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
213
                null, null);
213
                null, null);
214
            ErrorManager.getDefault().notify (x);
214
            ErrorManager.getDefault().dangerousNotify (x);
215
        } else {
215
        } else {
216
            try {
216
            try {
217
                element.setSimpleName(newName);
217
                element.setSimpleName(newName);
218
                ok = true;
218
                ok = true;
219
            } catch (JmiException e) {
219
            } catch (JmiException e) {
220
                ErrorManager.getDefault().notify(e);
220
                ErrorManager.getDefault().dangerousNotify(e);
221
            }
221
            }
222
        }
222
        }
223
        isOK = ok;
223
        isOK = ok;
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/AnnotationTypeMethodCustomizer.java (-5 / +5 lines)
Lines 232-238 Link Here
232
                ok = true;
232
                ok = true;
233
            }
233
            }
234
        } catch (JmiException e) {
234
        } catch (JmiException e) {
235
            ErrorManager.getDefault().notify(e);
235
            ErrorManager.getDefault().dangerousNotify(e);
236
        }
236
        }
237
        isOK = ok;
237
        isOK = ok;
238
        if (!ok) {
238
        if (!ok) {
Lines 263-269 Link Here
263
                ok = true;
263
                ok = true;
264
            }
264
            }
265
        } catch (JmiException e) {
265
        } catch (JmiException e) {
266
            ErrorManager.getDefault().notify(e);
266
            ErrorManager.getDefault().dangerousNotify(e);
267
        }
267
        }
268
        isOK = ok;
268
        isOK = ok;
269
        if (!ok)
269
        if (!ok)
Lines 290-296 Link Here
290
                ok = true;
290
                ok = true;
291
            }
291
            }
292
        } catch (JmiException e) {
292
        } catch (JmiException e) {
293
            ErrorManager.getDefault().notify(e);
293
            ErrorManager.getDefault().dangerousNotify(e);
294
        }
294
        }
295
        isOK = ok;
295
        isOK = ok;
296
        if (!ok) {
296
        if (!ok) {
Lines 346-352 Link Here
346
            e, ErrorManager.USER, null, 
346
            e, ErrorManager.USER, null, 
347
            getString(bundleKey),
347
            getString(bundleKey),
348
            null, null);
348
            null, null);
349
        ErrorManager.getDefault().notify(e);
349
        ErrorManager.getDefault().dangerousNotify(e);
350
    }
350
    }
351
    
351
    
352
    private static void notifyUserWarning(String bundleKey, String param, String msg) {
352
    private static void notifyUserWarning(String bundleKey, String param, String msg) {
Lines 355-360 Link Here
355
            e, ErrorManager.USER, null, 
355
            e, ErrorManager.USER, null, 
356
            NbBundle.getMessage(AnnotationTypeMethodCustomizer.class, bundleKey, param),
356
            NbBundle.getMessage(AnnotationTypeMethodCustomizer.class, bundleKey, param),
357
            null, null);
357
            null, null);
358
        ErrorManager.getDefault().notify(e);
358
        ErrorManager.getDefault().dangerousNotify(e);
359
    }
359
    }
360
}
360
}
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/ClassCustomizer.java (-5 / +5 lines)
Lines 281-287 Link Here
281
                element.setSuperClassName(mid);
281
                element.setSuperClassName(mid);
282
                ok = true;
282
                ok = true;
283
            } catch (JmiException e) {
283
            } catch (JmiException e) {
284
                ErrorManager.getDefault().notify(e);
284
                ErrorManager.getDefault().dangerousNotify(e);
285
            }
285
            }
286
        } else { 
286
        } else { 
287
            return; // nothing to change
287
            return; // nothing to change
Lines 305-311 Link Here
305
                x, ErrorManager.USER, null, 
305
                x, ErrorManager.USER, null, 
306
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
306
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
307
                null, null);
307
                null, null);
308
            ErrorManager.getDefault().notify (x);
308
            ErrorManager.getDefault().dangerousNotify (x);
309
        } else if (oldName.equals(newName)) {
309
        } else if (oldName.equals(newName)) {
310
            return; // nothing to change
310
            return; // nothing to change
311
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
311
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
Lines 314-333 Link Here
314
                x, ErrorManager.USER, null, 
314
                x, ErrorManager.USER, null, 
315
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
315
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
316
                null, null);
316
                null, null);
317
            ErrorManager.getDefault().notify (x);
317
            ErrorManager.getDefault().dangerousNotify (x);
318
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
318
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
319
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
319
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
320
            ErrorManager.getDefault().annotate(
320
            ErrorManager.getDefault().annotate(
321
                x, ErrorManager.USER, null, 
321
                x, ErrorManager.USER, null, 
322
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
322
                NbBundle.getMessage(ClassCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
323
                null, null);
323
                null, null);
324
            ErrorManager.getDefault().notify (x);
324
            ErrorManager.getDefault().dangerousNotify (x);
325
        } else {
325
        } else {
326
            try {
326
            try {
327
                element.setSimpleName(newName);
327
                element.setSimpleName(newName);
328
                ok = true;
328
                ok = true;
329
            } catch (JmiException e) {
329
            } catch (JmiException e) {
330
                ErrorManager.getDefault().notify(e);
330
                ErrorManager.getDefault().dangerousNotify(e);
331
            }
331
            }
332
        }
332
        }
333
        isOK = ok;
333
        isOK = ok;
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/ElementNode.java (-1 / +1 lines)
Lines 709-715 Link Here
709
                    JavaMetamodel.getDefaultRepository().endTrans();
709
                    JavaMetamodel.getDefaultRepository().endTrans();
710
                }
710
                }
711
            } catch (JmiException e) {
711
            } catch (JmiException e) {
712
                ErrorManager.getDefault().notify(e);
712
                ErrorManager.getDefault().dangerousNotify(e);
713
            }
713
            }
714
            return ret;
714
            return ret;
715
        }
715
        }
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/EnumConstantCustomizer.java (-2 / +2 lines)
Lines 126-132 Link Here
126
                constant.setName(newName);
126
                constant.setName(newName);
127
                ok = true;
127
                ok = true;
128
            } catch (JmiException e) {
128
            } catch (JmiException e) {
129
                ErrorManager.getDefault().notify(e);
129
                ErrorManager.getDefault().dangerousNotify(e);
130
            }
130
            }
131
        }
131
        }
132
        isOK = ok;
132
        isOK = ok;
Lines 134-140 Link Here
134
            nameTextField.setText(oldName);
134
            nameTextField.setText(oldName);
135
        }
135
        }
136
        if (x != null) {
136
        if (x != null) {
137
            ErrorManager.getDefault().notify(x);
137
            ErrorManager.getDefault().dangerousNotify(x);
138
        }
138
        }
139
    }//GEN-LAST:event_nameTextFieldFocusLost
139
    }//GEN-LAST:event_nameTextFieldFocusLost
140
    
140
    
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/EnumCustomizer.java (-4 / +4 lines)
Lines 211-217 Link Here
211
                x, ErrorManager.USER, null, 
211
                x, ErrorManager.USER, null, 
212
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
212
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
213
                null, null);
213
                null, null);
214
            ErrorManager.getDefault().notify (x);
214
            ErrorManager.getDefault().dangerousNotify (x);
215
        } else if (oldName.equals(newName)) {
215
        } else if (oldName.equals(newName)) {
216
            return; // nothing to change
216
            return; // nothing to change
217
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
217
        } else if (this.resource == null && jclass.getInnerClass(newName, true) != null) {
Lines 220-239 Link Here
220
                x, ErrorManager.USER, null, 
220
                x, ErrorManager.USER, null, 
221
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
221
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
222
                null, null);
222
                null, null);
223
            ErrorManager.getDefault().notify (x);
223
            ErrorManager.getDefault().dangerousNotify (x);
224
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
224
        } else if (this.jclass == null && SourceEditSupport.findTopLevelClass(this.resource, newName) != null) {
225
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
225
            IllegalArgumentException x = new IllegalArgumentException("Invalid name: " + newName); // NOI18N
226
            ErrorManager.getDefault().annotate(
226
            ErrorManager.getDefault().annotate(
227
                x, ErrorManager.USER, null, 
227
                x, ErrorManager.USER, null, 
228
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
228
                NbBundle.getMessage(EnumCustomizer.class, "MSG_Not_Valid_Identifier"), // NOI18N
229
                null, null);
229
                null, null);
230
            ErrorManager.getDefault().notify (x);
230
            ErrorManager.getDefault().dangerousNotify (x);
231
        } else {
231
        } else {
232
            try {
232
            try {
233
                element.setSimpleName(newName);
233
                element.setSimpleName(newName);
234
                ok = true;
234
                ok = true;
235
            } catch (JmiException e) {
235
            } catch (JmiException e) {
236
                ErrorManager.getDefault().notify(e);
236
                ErrorManager.getDefault().dangerousNotify(e);
237
            }
237
            }
238
        }
238
        }
239
        isOK = ok;
239
        isOK = ok;
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/FieldCustomizer.java (-5 / +5 lines)
Lines 254-260 Link Here
254
                ok = true;
254
                ok = true;
255
            }
255
            }
256
        } catch (JmiException e) {
256
        } catch (JmiException e) {
257
            ErrorManager.getDefault().notify(e);
257
            ErrorManager.getDefault().dangerousNotify(e);
258
        }
258
        }
259
        isOK = ok;
259
        isOK = ok;
260
        if (!ok)
260
        if (!ok)
Lines 273-279 Link Here
273
                element.setInitialValueText(newText);
273
                element.setInitialValueText(newText);
274
                ok = true;
274
                ok = true;
275
            } catch (JmiException e) {
275
            } catch (JmiException e) {
276
                ErrorManager.getDefault().notify(e);
276
                ErrorManager.getDefault().dangerousNotify(e);
277
            }
277
            }
278
        } else
278
        } else
279
            return;
279
            return;
Lines 302-308 Link Here
302
                ok = true;
302
                ok = true;
303
            }
303
            }
304
        } catch (JmiException e) {
304
        } catch (JmiException e) {
305
            ErrorManager.getDefault().notify(e);
305
            ErrorManager.getDefault().dangerousNotify(e);
306
        }
306
        }
307
        isOK = ok;
307
        isOK = ok;
308
        if (!ok) {
308
        if (!ok) {
Lines 351-357 Link Here
351
            e, ErrorManager.USER, null, 
351
            e, ErrorManager.USER, null, 
352
            NbBundle.getMessage(FieldCustomizer.class, bundleKey),
352
            NbBundle.getMessage(FieldCustomizer.class, bundleKey),
353
            null, null);
353
            null, null);
354
        ErrorManager.getDefault().notify(e);
354
        ErrorManager.getDefault().dangerousNotify(e);
355
355
356
    }
356
    }
357
    
357
    
Lines 361-367 Link Here
361
            e, ErrorManager.USER, null, 
361
            e, ErrorManager.USER, null, 
362
            NbBundle.getMessage(FieldCustomizer.class, bundleKey, param),
362
            NbBundle.getMessage(FieldCustomizer.class, bundleKey, param),
363
            null, null);
363
            null, null);
364
        ErrorManager.getDefault().notify(e);
364
        ErrorManager.getDefault().dangerousNotify(e);
365
    }
365
    }
366
    
366
    
367
}
367
}
(-)java/src/org/netbeans/modules/java/ui/nodes/elements/MethodCustomizer.java (-4 / +4 lines)
Lines 316-322 Link Here
316
                ok = true;
316
                ok = true;
317
            }
317
            }
318
        } catch (JmiException e) {
318
        } catch (JmiException e) {
319
            ErrorManager.getDefault().notify(e);
319
            ErrorManager.getDefault().dangerousNotify(e);
320
        }
320
        }
321
        isOK = ok;
321
        isOK = ok;
322
        if (!ok)
322
        if (!ok)
Lines 374-380 Link Here
374
                ok = true;
374
                ok = true;
375
            }
375
            }
376
        } catch (JmiException e) {
376
        } catch (JmiException e) {
377
            ErrorManager.getDefault().notify(e);
377
            ErrorManager.getDefault().dangerousNotify(e);
378
        }
378
        }
379
        isOK = ok;
379
        isOK = ok;
380
        if (!ok) {
380
        if (!ok) {
Lines 427-433 Link Here
427
            e, ErrorManager.USER, null, 
427
            e, ErrorManager.USER, null, 
428
            getString(bundleKey),
428
            getString(bundleKey),
429
            null, null);
429
            null, null);
430
        ErrorManager.getDefault().notify(e);
430
        ErrorManager.getDefault().dangerousNotify(e);
431
    }
431
    }
432
    
432
    
433
    private static void notifyUserWarning(String bundleKey, String param, String msg) {
433
    private static void notifyUserWarning(String bundleKey, String param, String msg) {
Lines 436-442 Link Here
436
            e, ErrorManager.USER, null, 
436
            e, ErrorManager.USER, null, 
437
            NbBundle.getMessage(MethodCustomizer.class, bundleKey, param),
437
            NbBundle.getMessage(MethodCustomizer.class, bundleKey, param),
438
            null, null);
438
            null, null);
439
        ErrorManager.getDefault().notify(e);
439
        ErrorManager.getDefault().dangerousNotify(e);
440
    }
440
    }
441
    
441
    
442
    private static List/*<Type>*/ params2Types(List/*<Parameter>*/ params) {
442
    private static List/*<Type>*/ params2Types(List/*<Parameter>*/ params) {
(-)javadoc/src/org/netbeans/modules/javadoc/comments/AutoCommentPanel.java (-1 / +1 lines)
Lines 642-648 Link Here
642
            this.autoCommenter.addAutoCommentChangeListener(this);
642
            this.autoCommenter.addAutoCommentChangeListener(this);
643
            resetState();
643
            resetState();
644
        } catch(java.util.TooManyListenersException tooEx){
644
        } catch(java.util.TooManyListenersException tooEx){
645
            ErrorManager.getDefault().notify(tooEx);
645
            ErrorManager.getDefault().dangerousNotify(tooEx);
646
        }
646
        }
647
    }
647
    }
648
    
648
    
(-)javadoc/src/org/netbeans/modules/javadoc/comments/AutoCommenter.java (-7 / +7 lines)
Lines 250-256 Link Here
250
                        JavaModel.getJavaRepository().endTrans();
250
                        JavaModel.getJavaRepository().endTrans();
251
                    }
251
                    }
252
                } catch (JmiException e) {
252
                } catch (JmiException e) {
253
                    ErrorManager.getDefault().notify(e);
253
                    ErrorManager.getDefault().dangerousNotify(e);
254
                }
254
                }
255
            }
255
            }
256
        });
256
        });
Lines 282-290 Link Here
282
                        JavaModel.getJavaRepository().endTrans();
282
                        JavaModel.getJavaRepository().endTrans();
283
                    }
283
                    }
284
                } catch (JmiException e) {
284
                } catch (JmiException e) {
285
                    ErrorManager.getDefault().notify(e);
285
                    ErrorManager.getDefault().dangerousNotify(e);
286
                } catch (org.openide.src.SourceException e) {
286
                } catch (org.openide.src.SourceException e) {
287
                    ErrorManager.getDefault().notify(e);
287
                    ErrorManager.getDefault().dangerousNotify(e);
288
                }
288
                }
289
            }
289
            }
290
        });
290
        });
Lines 317-325 Link Here
317
                        JavaModel.getJavaRepository().endTrans();
317
                        JavaModel.getJavaRepository().endTrans();
318
                    }
318
                    }
319
                } catch (JmiException e) {
319
                } catch (JmiException e) {
320
                    ErrorManager.getDefault().notify(e);
320
                    ErrorManager.getDefault().dangerousNotify(e);
321
                } catch (org.openide.src.SourceException e) {
321
                } catch (org.openide.src.SourceException e) {
322
                    ErrorManager.getDefault().notify(e);
322
                    ErrorManager.getDefault().dangerousNotify(e);
323
                }
323
                }
324
            }
324
            }
325
        });
325
        });
Lines 346-352 Link Here
346
                JavaModel.getJavaRepository().endTrans();
346
                JavaModel.getJavaRepository().endTrans();
347
            }
347
            }
348
        } catch (JmiException ex) {
348
        } catch (JmiException ex) {
349
            ErrorManager.getDefault().notify(ex);
349
            ErrorManager.getDefault().dangerousNotify(ex);
350
        }
350
        }
351
    }
351
    }
352
352
Lines 519-525 Link Here
519
                            JavaModel.getJavaRepository().endTrans();
519
                            JavaModel.getJavaRepository().endTrans();
520
                        }
520
                        }
521
                    } catch (JmiException e) {
521
                    } catch (JmiException e) {
522
                        ErrorManager.getDefault().notify(e);
522
                        ErrorManager.getDefault().dangerousNotify(e);
523
                        return;
523
                        return;
524
                    }
524
                    }
525
                }
525
                }
(-)javadoc/src/org/netbeans/modules/javadoc/comments/CorrectJavaDocAction.java (-2 / +2 lines)
Lines 118-126 Link Here
118
                        JavaModel.getJavaRepository().endTrans(fail);
118
                        JavaModel.getJavaRepository().endTrans(fail);
119
                    }
119
                    }
120
                } catch (JmiException e) {
120
                } catch (JmiException e) {
121
                    ErrorManager.getDefault().notify(e);
121
                    ErrorManager.getDefault().dangerousNotify(e);
122
                } catch (org.openide.src.SourceException e) {
122
                } catch (org.openide.src.SourceException e) {
123
                    ErrorManager.getDefault().notify(e);
123
                    ErrorManager.getDefault().dangerousNotify(e);
124
                }
124
                }
125
            }
125
            }
126
        };
126
        };
(-)javadoc/src/org/netbeans/modules/javadoc/comments/JavaDocEditorPanel.java (-1 / +1 lines)
Lines 720-726 Link Here
720
            listModel.copyInto(tags);
720
            listModel.copyInto(tags);
721
            jd.changeTags(tags,JavaDoc.SET);
721
            jd.changeTags(tags,JavaDoc.SET);
722
        } catch (Exception e) {
722
        } catch (Exception e) {
723
            ErrorManager.getDefault().notify(e);
723
            ErrorManager.getDefault().dangerousNotify(e);
724
        }
724
        }
725
        return jd;
725
        return jd;
726
    }
726
    }
(-)javadoc/src/org/netbeans/modules/javadoc/comments/ParamTagPanel.java (-1 / +1 lines)
Lines 78-84 Link Here
78
                    JavaModel.getJavaRepository().endTrans();
78
                    JavaModel.getJavaRepository().endTrans();
79
                }
79
                }
80
            } catch (JmiException e) {
80
            } catch (JmiException e) {
81
                ErrorManager.getDefault().notify(e);
81
                ErrorManager.getDefault().dangerousNotify(e);
82
            }
82
            }
83
            parameterComboBox.setSelectedItem( "" ); // NOI18N
83
            parameterComboBox.setSelectedItem( "" ); // NOI18N
84
        }
84
        }
(-)javadoc/src/org/netbeans/modules/javadoc/comments/ThrowsTagPanel.java (-1 / +1 lines)
Lines 76-82 Link Here
76
                    JavaModel.getJavaRepository().endTrans();
76
                    JavaModel.getJavaRepository().endTrans();
77
                }
77
                }
78
            } catch (JmiException e) {
78
            } catch (JmiException e) {
79
                ErrorManager.getDefault().notify(e);
79
                ErrorManager.getDefault().dangerousNotify(e);
80
            }
80
            }
81
            exceptionComboBox.setSelectedItem( "" ); // NOI18N
81
            exceptionComboBox.setSelectedItem( "" ); // NOI18N
82
        }
82
        }
(-)javadoc/src/org/netbeans/modules/javadoc/httpfs/HTTPFileSystemBeanInfo.java (-2 / +2 lines)
Lines 72-78 Link Here
72
72
73
            }
73
            }
74
            catch( IntrospectionException e ) {            
74
            catch( IntrospectionException e ) {            
75
                org.openide.ErrorManager.getDefault().notify(e);
75
                org.openide.ErrorManager.getDefault().dangerousNotify(e);
76
            }
76
            }
77
        }
77
        }
78
        return propertyDescriptors;        
78
        return propertyDescriptors;        
Lines 87-93 Link Here
87
        try {
87
        try {
88
            return new BeanInfo[] { Introspector.getBeanInfo (FileSystem.class) };
88
            return new BeanInfo[] { Introspector.getBeanInfo (FileSystem.class) };
89
        } catch (IntrospectionException ie) {
89
        } catch (IntrospectionException ie) {
90
            org.openide.ErrorManager.getDefault().notify(ie);
90
            org.openide.ErrorManager.getDefault().dangerousNotify(ie);
91
            return null;
91
            return null;
92
        }
92
        }
93
    }
93
    }
(-)javadoc/src/org/netbeans/modules/javadoc/search/JavadocRegistry.java (-1 / +1 lines)
Lines 277-283 Link Here
277
            }
277
            }
278
            return ecb.getEncoding ();
278
            return ecb.getEncoding ();
279
        } catch (IOException ioe) {
279
        } catch (IOException ioe) {
280
            ErrorManager.getDefault().notify (ioe);
280
            ErrorManager.getDefault().dangerousNotify (ioe);
281
        }
281
        }
282
        return null;
282
        return null;
283
    }
283
    }
(-)javadoc/src/org/netbeans/modules/javadoc/search/JavadocSearchTypeBeanInfo.java (-1 / +1 lines)
Lines 33-39 Link Here
33
        try {
33
        try {
34
            return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) };
34
            return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) };
35
        } catch (IntrospectionException ie) {
35
        } catch (IntrospectionException ie) {
36
            org.openide.ErrorManager.getDefault().notify(ie);
36
            org.openide.ErrorManager.getDefault().dangerousNotify(ie);
37
            return null;
37
            return null;
38
        }
38
        }
39
    }
39
    }
(-)javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12.java (-3 / +3 lines)
Lines 101-107 Link Here
101
                br.close();
101
                br.close();
102
        }
102
        }
103
        catch ( java.io.IOException e ) {
103
        catch ( java.io.IOException e ) {
104
            ErrorManager.getDefault().notify(e);
104
            ErrorManager.getDefault().dangerousNotify(e);
105
        }
105
        }
106
    }
106
    }
107
    
107
    
Lines 299-305 Link Here
299
                        return;
299
                        return;
300
                    }
300
                    }
301
                    catch ( java.io.IOException e ) {
301
                    catch ( java.io.IOException e ) {
302
                        ErrorManager.getDefault().notify(e);
302
                        ErrorManager.getDefault().dangerousNotify(e);
303
                    }
303
                    }
304
                }
304
                }
305
                
305
                
Lines 318-324 Link Here
318
                           return;
318
                           return;
319
                        }
319
                        }
320
                        catch ( java.io.IOException e ) {
320
                        catch ( java.io.IOException e ) {
321
                            ErrorManager.getDefault().notify(e);
321
                            ErrorManager.getDefault().dangerousNotify(e);
322
                        }
322
                        }
323
                    }
323
                    }
324
                    
324
                    
(-)javadoc/src/org/netbeans/modules/javadoc/search/SearchThreadJdk12_japan.java (-3 / +3 lines)
Lines 101-107 Link Here
101
                br.close();
101
                br.close();
102
        }
102
        }
103
        catch ( java.io.IOException e ) {
103
        catch ( java.io.IOException e ) {
104
            ErrorManager.getDefault().notify(e);
104
            ErrorManager.getDefault().dangerousNotify(e);
105
        }
105
        }
106
    }
106
    }
107
107
Lines 302-308 Link Here
302
                        return;
302
                        return;
303
                    }
303
                    }
304
                    catch ( java.io.IOException e ) {
304
                    catch ( java.io.IOException e ) {
305
                        ErrorManager.getDefault().notify(e);
305
                        ErrorManager.getDefault().dangerousNotify(e);
306
                    }
306
                    }
307
                }
307
                }
308
                
308
                
Lines 321-327 Link Here
321
                           return;
321
                           return;
322
                        }
322
                        }
323
                        catch ( java.io.IOException e ) {
323
                        catch ( java.io.IOException e ) {
324
                            ErrorManager.getDefault().notify(e);
324
                            ErrorManager.getDefault().dangerousNotify(e);
325
                        }
325
                        }
326
                    }
326
                    }
327
                    
327
                    
(-)junit/src/org/netbeans/modules/junit/CreateTestAction.java (-2 / +2 lines)
Lines 234-240 Link Here
234
                                    progress,
234
                                    progress,
235
                                    false);            //do not skip any classes
235
                                    false);            //do not skip any classes
236
                        } catch (CreationError ex) {
236
                        } catch (CreationError ex) {
237
                            ErrorManager.getDefault().notify(ex);
237
                            ErrorManager.getDefault().dangerousNotify(ex);
238
                            results = new CreationResults();
238
                            results = new CreationResults();
239
                        }
239
                        }
240
                    } else {
240
                    } else {
Lines 261-267 Link Here
261
                                                        null,
261
                                                        null,
262
                                                        progress));
262
                                                        progress));
263
                        } catch (CreationError e) {
263
                        } catch (CreationError e) {
264
                            ErrorManager.getDefault().notify(e);
264
                            ErrorManager.getDefault().dangerousNotify(e);
265
                        }
265
                        }
266
                    }
266
                    }
267
                }
267
                }
(-)junit/src/org/netbeans/modules/junit/JUnitSettingsBeanInfo.java (-1 / +1 lines)
Lines 131-137 Link Here
131
            };
131
            };
132
        }
132
        }
133
        catch (IntrospectionException ie) {
133
        catch (IntrospectionException ie) {
134
            org.openide.ErrorManager.getDefault().notify(ie);
134
            org.openide.ErrorManager.getDefault().dangerousNotify(ie);
135
            return null;
135
            return null;
136
        }
136
        }
137
    }
137
    }
(-)junit/src/org/netbeans/modules/junit/TestCreator.java (-1 / +1 lines)
Lines 1938-1944 Link Here
1938
                    return str;
1938
                    return str;
1939
                }
1939
                }
1940
            } catch (MissingResourceException ex) {
1940
            } catch (MissingResourceException ex) {
1941
                ErrorManager.getDefault().notify(ex);
1941
                ErrorManager.getDefault().dangerousNotify(ex);
1942
                return "";
1942
                return "";
1943
            }
1943
            }
1944
        }
1944
        }
(-)junit/src/org/netbeans/modules/junit/output/ResultDisplayHandler.java (-1 / +1 lines)
Lines 316-322 Link Here
316
                try {
316
                try {
317
                    method.invoke(treePanel, new Object[] {param});
317
                    method.invoke(treePanel, new Object[] {param});
318
                } catch (InvocationTargetException ex) {
318
                } catch (InvocationTargetException ex) {
319
                    ErrorManager.getDefault().notify(ex.getTargetException());
319
                    ErrorManager.getDefault().dangerousNotify(ex.getTargetException());
320
                } catch (Exception ex) {
320
                } catch (Exception ex) {
321
                    ErrorManager.getDefault().notify(ErrorManager.ERROR, ex);
321
                    ErrorManager.getDefault().notify(ErrorManager.ERROR, ex);
322
                }
322
                }
(-)junit/src/org/netbeans/modules/junit/output/ResultWindow.java (-1 / +1 lines)
Lines 179-185 Link Here
179
            try {
179
            try {
180
                method.invoke(tc, null);
180
                method.invoke(tc, null);
181
            } catch (InvocationTargetException invocationExc) {
181
            } catch (InvocationTargetException invocationExc) {
182
                ErrorManager.getDefault().notify(invocationExc);
182
                ErrorManager.getDefault().dangerousNotify(invocationExc);
183
            } catch (Exception ex) {
183
            } catch (Exception ex) {
184
                topCompMethodsMap.remove(messageName);
184
                topCompMethodsMap.remove(messageName);
185
                ErrorManager.getDefault().notify(ErrorManager.ERROR, ex);
185
                ErrorManager.getDefault().notify(ErrorManager.ERROR, ex);
(-)j2eeserver/src/org/netbeans/modules/j2ee/deployment/config/ModuleDeploymentSupport.java (-1 / +1 lines)
Lines 526-532 Link Here
526
            processEvent(oldValue,newValue,eventBean.proxy,event);
526
            processEvent(oldValue,newValue,eventBean.proxy,event);
527
527
528
        } catch (Exception e) {
528
        } catch (Exception e) {
529
            ErrorManager.getDefault().notify(e);
529
            ErrorManager.getDefault().dangerousNotify(e);
530
        }
530
        }
531
    }
531
    }
532
532
(-)j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ServerInstance.java (-4 / +4 lines)
Lines 185-191 Link Here
185
                try {
185
                try {
186
                    j2eePlatformImpl = fact.getJ2eePlatformImpl(isConnected() ? getDeploymentManager() : getDisconnectedDeploymentManager());
186
                    j2eePlatformImpl = fact.getJ2eePlatformImpl(isConnected() ? getDeploymentManager() : getDisconnectedDeploymentManager());
187
                }  catch (DeploymentManagerCreationException dmce) {
187
                }  catch (DeploymentManagerCreationException dmce) {
188
                    ErrorManager.getDefault().notify(dmce);
188
                    ErrorManager.getDefault().dangerousNotify(dmce);
189
                }
189
                }
190
            }
190
            }
191
        }
191
        }
Lines 388-394 Link Here
388
            try {
388
            try {
389
                startServer = server.getOptionalFactory ().getStartServer(getDisconnectedDeploymentManager());
389
                startServer = server.getOptionalFactory ().getStartServer(getDisconnectedDeploymentManager());
390
            }  catch (DeploymentManagerCreationException dmce) {
390
            }  catch (DeploymentManagerCreationException dmce) {
391
                ErrorManager.getDefault().notify(dmce);
391
                ErrorManager.getDefault().dangerousNotify(dmce);
392
            }
392
            }
393
        }
393
        }
394
        return startServer;
394
        return startServer;
Lines 413-419 Link Here
413
            try {
413
            try {
414
                findJSPServlet = server.getOptionalFactory().getFindJSPServlet (getDisconnectedDeploymentManager());
414
                findJSPServlet = server.getOptionalFactory().getFindJSPServlet (getDisconnectedDeploymentManager());
415
            }  catch (DeploymentManagerCreationException dmce) {
415
            }  catch (DeploymentManagerCreationException dmce) {
416
                ErrorManager.getDefault().notify(dmce);
416
                ErrorManager.getDefault().dangerousNotify(dmce);
417
            }
417
            }
418
        }
418
        }
419
        return findJSPServlet;
419
        return findJSPServlet;
Lines 1455-1461 Link Here
1455
        try {
1455
        try {
1456
           new RequestProcessor().post(test).waitFinished(timeout);
1456
           new RequestProcessor().post(test).waitFinished(timeout);
1457
        } catch (InterruptedException ie) {
1457
        } catch (InterruptedException ie) {
1458
            ErrorManager.getDefault().notify(ie);
1458
            ErrorManager.getDefault().dangerousNotify(ie);
1459
        } finally {
1459
        } finally {
1460
            return test.result();
1460
            return test.result();
1461
        }
1461
        }
(-)j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/query/J2eePlatformJavadocForBinaryQuery.java (-2 / +2 lines)
Lines 165-171 Link Here
165
                    normalizedURL = fo.getURL();
165
                    normalizedURL = fo.getURL();
166
                    this.normalizedURLCache.put (url, normalizedURL);
166
                    this.normalizedURLCache.put (url, normalizedURL);
167
                } catch (FileStateInvalidException e) {
167
                } catch (FileStateInvalidException e) {
168
                    ErrorManager.getDefault().notify(e);
168
                    ErrorManager.getDefault().dangerousNotify(e);
169
                }
169
                }
170
            }
170
            }
171
        }
171
        }
Lines 203-209 Link Here
203
        try {
203
        try {
204
            return result == null ? rootURL : result.getURL();        
204
            return result == null ? rootURL : result.getURL();        
205
        } catch (FileStateInvalidException e) {
205
        } catch (FileStateInvalidException e) {
206
            ErrorManager.getDefault().notify(e);
206
            ErrorManager.getDefault().dangerousNotify(e);
207
            return rootURL;
207
            return rootURL;
208
        }
208
        }
209
    }
209
    }
(-)j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/query/J2eePlatformSourceForBinaryQuery.java (-1 / +1 lines)
Lines 106-112 Link Here
106
                    normalizedURL = fo.getURL();
106
                    normalizedURL = fo.getURL();
107
                    this.normalizedURLCache.put (url, normalizedURL);
107
                    this.normalizedURLCache.put (url, normalizedURL);
108
                } catch (FileStateInvalidException e) {
108
                } catch (FileStateInvalidException e) {
109
                    ErrorManager.getDefault().notify(e);
109
                    ErrorManager.getDefault().dangerousNotify(e);
110
                }
110
                }
111
            }
111
            }
112
        }
112
        }
(-)j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/ui/RegistryNodeProvider.java (-3 / +3 lines)
Lines 79-85 Link Here
79
                    try {
79
                    try {
80
                        return server.getDisconnectedDeploymentManager();
80
                        return server.getDisconnectedDeploymentManager();
81
                    } catch (DeploymentManagerCreationException dmce) {
81
                    } catch (DeploymentManagerCreationException dmce) {
82
                        ErrorManager.getDefault().notify(dmce);
82
                        ErrorManager.getDefault().dangerousNotify(dmce);
83
                    }
83
                    }
84
                }
84
                }
85
                return null;
85
                return null;
Lines 100-106 Link Here
100
                        return instance.isConnected() ? instance.getDeploymentManager()
100
                        return instance.isConnected() ? instance.getDeploymentManager()
101
                                                      : instance.getDisconnectedDeploymentManager();
101
                                                      : instance.getDisconnectedDeploymentManager();
102
                    }  catch (DeploymentManagerCreationException dmce) {
102
                    }  catch (DeploymentManagerCreationException dmce) {
103
                        ErrorManager.getDefault().notify(dmce);
103
                        ErrorManager.getDefault().dangerousNotify(dmce);
104
                    }
104
                    }
105
                }
105
                }
106
                return null;
106
                return null;
Lines 122-128 Link Here
122
                        return instance.isConnected() ? instance.getDeploymentManager()
122
                        return instance.isConnected() ? instance.getDeploymentManager()
123
                                                      : instance.getDisconnectedDeploymentManager();
123
                                                      : instance.getDisconnectedDeploymentManager();
124
                    }  catch (DeploymentManagerCreationException dmce) {
124
                    }  catch (DeploymentManagerCreationException dmce) {
125
                        ErrorManager.getDefault().notify(dmce);
125
                        ErrorManager.getDefault().dangerousNotify(dmce);
126
                    }
126
                    }
127
                }
127
                }
128
                if (Target.class.isAssignableFrom(clazz))
128
                if (Target.class.isAssignableFrom(clazz))
(-)mdr/module/src/org/netbeans/modules/mdr/MDRDataObject.java (-1 / +1 lines)
Lines 134-140 Link Here
134
                result.mkdirs();
134
                result.mkdirs();
135
                return resultFolder;
135
                return resultFolder;
136
            } catch (Exception e) {
136
            } catch (Exception e) {
137
                ErrorManager.getDefault().notify(e);
137
                ErrorManager.getDefault().dangerousNotify(e);
138
                return "";
138
                return "";
139
            }
139
            }
140
        } else {
140
        } else {
(-)openide/fs/src/org/openide/filesystems/FileUtil.java (-2 / +2 lines)
Lines 1250-1256 Link Here
1250
                return toFileObject(jarFile);
1250
                return toFileObject(jarFile);
1251
            }
1251
            }
1252
        } catch (FileStateInvalidException e) {
1252
        } catch (FileStateInvalidException e) {
1253
            ErrorManager.getDefault().notify(e);
1253
            ErrorManager.getDefault().dangerousNotify(e);
1254
        }
1254
        }
1255
1255
1256
        return null;
1256
        return null;
Lines 1278-1284 Link Here
1278
                try {
1278
                try {
1279
                    return new URL(path.substring(0, index));
1279
                    return new URL(path.substring(0, index));
1280
                } catch (MalformedURLException mue) {
1280
                } catch (MalformedURLException mue) {
1281
                    ErrorManager.getDefault().notify(mue);
1281
                    ErrorManager.getDefault().dangerousNotify(mue);
1282
                }
1282
                }
1283
            }
1283
            }
1284
        }
1284
        }
(-)openide/fs/src/org/openide/filesystems/XMLMapAttr.java (-1 / +1 lines)
Lines 538-544 Link Here
538
                    }
538
                    }
539
                }
539
                }
540
            } catch (NumberFormatException e) {
540
            } catch (NumberFormatException e) {
541
                ErrorManager.getDefault().notify(e);
541
                ErrorManager.getDefault().dangerousNotify(e);
542
542
543
                return inStr;
543
                return inStr;
544
            }
544
            }
(-)openide/loaders/src/org/openide/actions/FileSystemAction.java (-1 / +1 lines)
Lines 174-180 Link Here
174
                enabled = a.isEnabled();
174
                enabled = a.isEnabled();
175
            } catch (RuntimeException e) {
175
            } catch (RuntimeException e) {
176
                ErrorManager em = ErrorManager.getDefault();
176
                ErrorManager em = ErrorManager.getDefault();
177
                em.annotate(e, ErrorManager.UNKNOWN, 
177
                em.annotate(e, ErrorManager.DangerousUnknownConstant, 
178
                    "Guilty action: " + a.getClass().getName(), null, null, null); // NOI18N
178
                    "Guilty action: " + a.getClass().getName(), null, null, null); // NOI18N
179
                em.notify(e);
179
                em.notify(e);
180
            }
180
            }
(-)openide/loaders/src/org/openide/loaders/FolderLookup.java (-1 / +1 lines)
Lines 248-254 Link Here
248
        ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e);
248
        ErrorManager.getDefault ().notify (ErrorManager.INFORMATIONAL, e);
249
    }
249
    }
250
    private static void exception(Exception e, FileObject fo) {
250
    private static void exception(Exception e, FileObject fo) {
251
        ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "Bad file: " + fo, null, null, null); // NOI18N
251
        ErrorManager.getDefault().annotate(e, ErrorManager.DangerousUnknownConstant, "Bad file: " + fo, null, null, null); // NOI18N
252
        exception(e);
252
        exception(e);
253
    }
253
    }
254
254
(-)openide/loaders/src/org/openide/loaders/InstanceSupport.java (-2 / +2 lines)
Lines 128-139 Link Here
128
            }
128
            }
129
        } catch (IOException ex) {
129
        } catch (IOException ex) {
130
            ErrorManager.getDefault().annotate
130
            ErrorManager.getDefault().annotate
131
                (ex, ErrorManager.UNKNOWN, "From file: " + entry.getFile(), null, null, null); // NOI18N
131
                (ex, ErrorManager.DangerousUnknownConstant, "From file: " + entry.getFile(), null, null, null); // NOI18N
132
            clazzException = ex;
132
            clazzException = ex;
133
            throw ex;
133
            throw ex;
134
        } catch (ClassNotFoundException ex) {
134
        } catch (ClassNotFoundException ex) {
135
            ErrorManager.getDefault().annotate
135
            ErrorManager.getDefault().annotate
136
                (ex, ErrorManager.UNKNOWN, "From file: " + entry.getFile(), null, null, null); // NOI18N
136
                (ex, ErrorManager.DangerousUnknownConstant, "From file: " + entry.getFile(), null, null, null); // NOI18N
137
            clazzException = ex;
137
            clazzException = ex;
138
            throw ex;
138
            throw ex;
139
        } catch (RuntimeException re) {
139
        } catch (RuntimeException re) {
(-)openide/loaders/test/unit/src/org/openide/loaders/InstanceDataObjectTest.java (-1 / +1 lines)
Lines 161-167 Link Here
161
//                        l.propertyChange(new PropertyChangeEvent(
161
//                        l.propertyChange(new PropertyChangeEvent(
162
//                            primary, DataObject.PROP_COOKIE, null, null));
162
//                            primary, DataObject.PROP_COOKIE, null, null));
163
                    } catch(IOException ioe) {
163
                    } catch(IOException ioe) {
164
                        ErrorManager.getDefault().notify(ioe);
164
                        ErrorManager.getDefault().dangerousNotify(ioe);
165
                        l.exception = ioe;
165
                        l.exception = ioe;
166
                    }
166
                    }
167
                };
167
                };
(-)openide/loaders/test/unit/src/org/openide/loaders/OperationListenerTest.java (-1 / +1 lines)
Lines 142-148 Link Here
142
            } catch (IOException ex) {
142
            } catch (IOException ex) {
143
                // ok
143
                // ok
144
                err.log("Exception thrown correctly:");
144
                err.log("Exception thrown correctly:");
145
                err.notify(ex);
145
                err.dangerousNotify(ex);
146
            }
146
            }
147
            assertEquals ("Loader created an object", loader, loader.obj.getLoader());
147
            assertEquals ("Loader created an object", loader, loader.obj.getLoader());
148
            
148
            
(-)openide/masterfs/src/org/netbeans/modules/masterfs/Delegate.java (-1 / +1 lines)
Lines 151-157 Link Here
151
            try {
151
            try {
152
                reLock();
152
                reLock();
153
            } catch (IOException e) {
153
            } catch (IOException e) {
154
                ErrorManager.getDefault().notify(e);
154
                ErrorManager.getDefault().dangerousNotify(e);
155
            }
155
            }
156
        }
156
        }
157
    }
157
    }
(-)openide/masterfs/src/org/netbeans/modules/masterfs/GlobalVisibilityQueryImpl.java (-1 / +1 lines)
Lines 131-137 Link Here
131
            ideSettings = null;
131
            ideSettings = null;
132
        } catch (Exception e) {
132
        } catch (Exception e) {
133
            ideSettings = null;
133
            ideSettings = null;
134
            ErrorManager.getDefault().notify(e);
134
            ErrorManager.getDefault().dangerousNotify(e);
135
        }
135
        }
136
        return retVal;
136
        return retVal;
137
    }
137
    }
(-)openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileObject.java (-2 / +2 lines)
Lines 520-526 Link Here
520
                new AtomicAction(this).refresh();
520
                new AtomicAction(this).refresh();
521
        } catch (IOException e) {
521
        } catch (IOException e) {
522
            // shouldn't occure
522
            // shouldn't occure
523
            ErrorManager.getDefault().notify(e);
523
            ErrorManager.getDefault().dangerousNotify(e);
524
        }
524
        }
525
    }
525
    }
526
526
Lines 638-644 Link Here
638
                    try {
638
                    try {
639
                        MountTable.getDefault().mount(getPath(), fs);
639
                        MountTable.getDefault().mount(getPath(), fs);
640
                    } catch (IOException iex) {
640
                    } catch (IOException iex) {
641
                        ErrorManager.getDefault().notify(iex);
641
                        ErrorManager.getDefault().dangerousNotify(iex);
642
                    }
642
                    }
643
                }
643
                }
644
            }
644
            }
(-)openide/masterfs/src/org/netbeans/modules/masterfs/MasterFileSystem.java (-1 / +1 lines)
Lines 365-371 Link Here
365
                try {
365
                try {
366
                    ap.addFileStatusListener (this);
366
                    ap.addFileStatusListener (this);
367
                } catch (java.util.TooManyListenersException ex) {
367
                } catch (java.util.TooManyListenersException ex) {
368
                    org.openide.ErrorManager.getDefault ().notify (ex);
368
                    org.openide.ErrorManager.getDefault ().dangerousNotify (ex);
369
                }
369
                }
370
            }
370
            }
371
            
371
            
(-)openide/masterfs/src/org/netbeans/modules/masterfs/MasterURLMapper.java (-1 / +1 lines)
Lines 50-56 Link Here
50
                ErrorManager.getDefault().annotate(iax, 
50
                ErrorManager.getDefault().annotate(iax, 
51
                        "; might be because your user directory is on a Windows UNC path (issue #46813)? If so, try using mapped drive letters.");//NOI18N                
51
                        "; might be because your user directory is on a Windows UNC path (issue #46813)? If so, try using mapped drive letters.");//NOI18N                
52
            }            
52
            }            
53
            ErrorManager.getDefault().notify(iax);
53
            ErrorManager.getDefault().dangerousNotify(iax);
54
            return null;
54
            return null;
55
        }
55
        }
56
56
(-)openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/FileBasedURLMapper.java (-1 / +1 lines)
Lines 93-99 Link Here
93
            if (!file.exists()) {
93
            if (!file.exists()) {
94
                final StringBuffer sb = new StringBuffer();
94
                final StringBuffer sb = new StringBuffer();
95
                sb.append(e.getLocalizedMessage()).append(" [").append(url.toExternalForm()).append(']');//NOI18N
95
                sb.append(e.getLocalizedMessage()).append(" [").append(url.toExternalForm()).append(']');//NOI18N
96
                ErrorManager.getDefault().notify(new IllegalArgumentException(sb.toString()));
96
                ErrorManager.getDefault().dangerousNotify(new IllegalArgumentException(sb.toString()));
97
                return null;
97
                return null;
98
            }
98
            }
99
        }
99
        }
(-)openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLock.java (-1 / +1 lines)
Lines 246-252 Link Here
246
                        channel.close();
246
                        channel.close();
247
                    }
247
                    }
248
                } catch (java.io.IOException e) {
248
                } catch (java.io.IOException e) {
249
                    ErrorManager.getDefault().notify(e);
249
                    ErrorManager.getDefault().dangerousNotify(e);
250
                }
250
                }
251
                
251
                
252
                super.releaseLock();
252
                super.releaseLock();
(-)openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockUtils.java (-1 / +1 lines)
Lines 58-64 Link Here
58
        try {
58
        try {
59
            file = file.getCanonicalFile();
59
            file = file.getCanonicalFile();
60
        } catch (IOException iex) {
60
        } catch (IOException iex) {
61
            ErrorManager.getDefault().notify(iex);            
61
            ErrorManager.getDefault().dangerousNotify(iex);            
62
        }
62
        }
63
        
63
        
64
        final File parentFile = file.getParentFile();
64
        final File parentFile = file.getParentFile();
(-)openide/masterfs/src/org/netbeans/modules/masterfs/providers/Attributes.java (-3 / +3 lines)
Lines 148-154 Link Here
148
                try {
148
                try {
149
                    getPreferedAttributes().writeAttribute(translatedName, attrName, value);
149
                    getPreferedAttributes().writeAttribute(translatedName, attrName, value);
150
                } catch (IOException e) {
150
                } catch (IOException e) {
151
                    ErrorManager.getDefault().notify(e);
151
                    ErrorManager.getDefault().dangerousNotify(e);
152
                }
152
                }
153
            }
153
            }
154
            super.deleteAttributes(name);
154
            super.deleteAttributes(name);
Lines 188-196 Link Here
188
                try {
188
                try {
189
                    exLFs = ExLocalFileSystem.getInstance(getRootForAttributes());                    
189
                    exLFs = ExLocalFileSystem.getInstance(getRootForAttributes());                    
190
                } catch (PropertyVetoException e) {
190
                } catch (PropertyVetoException e) {
191
                    ErrorManager.getDefault().notify(e);
191
                    ErrorManager.getDefault().dangerousNotify(e);
192
                } catch (IOException e) {
192
                } catch (IOException e) {
193
                    ErrorManager.getDefault().notify(e);
193
                    ErrorManager.getDefault().dangerousNotify(e);
194
                }
194
                }
195
                sharedUserAttributes = exLFs.getAttributes();
195
                sharedUserAttributes = exLFs.getAttributes();
196
            }
196
            }
(-)openide/nodes/src/org/openide/nodes/BeanNode.java (-2 / +2 lines)
Lines 555-561 Link Here
555
                // (e.g. SharedClassObject.initialize throws RuntimeException -> it is
555
                // (e.g. SharedClassObject.initialize throws RuntimeException -> it is
556
                // caught here and probably someone wants to know).
556
                // caught here and probably someone wants to know).
557
                ErrorManager.getDefault().annotate(
557
                ErrorManager.getDefault().annotate(
558
                    e, ErrorManager.UNKNOWN,
558
                    e, ErrorManager.DangerousUnknownConstant,
559
                    "Trying to invoke " + method + " where introspected class is " + clazz.getName(), null, null, null
559
                    "Trying to invoke " + method + " where introspected class is " + clazz.getName(), null, null, null
560
                ); // NOI18N
560
                ); // NOI18N
561
                NodeOp.warning(e);
561
                NodeOp.warning(e);
Lines 660-666 Link Here
660
        } catch (Exception e) {
660
        } catch (Exception e) {
661
            ErrorManager em = ErrorManager.getDefault();
661
            ErrorManager em = ErrorManager.getDefault();
662
            em.annotate(
662
            em.annotate(
663
                e, ErrorManager.UNKNOWN, "Bad method: " + clazz.getName() + "." + nameGetter.getName(), //NOI18N
663
                e, ErrorManager.DangerousUnknownConstant, "Bad method: " + clazz.getName() + "." + nameGetter.getName(), //NOI18N
664
                null, null, null
664
                null, null, null
665
            );
665
            );
666
            em.notify(ErrorManager.INFORMATIONAL, e);
666
            em.notify(ErrorManager.INFORMATIONAL, e);
(-)openide/nodes/src/org/openide/util/actions/NodeAction.java (-1 / +1 lines)
Lines 323-329 Link Here
323
                firePropertyChange(PROP_ENABLED, null, null);
323
                firePropertyChange(PROP_ENABLED, null, null);
324
            } catch (NullPointerException e) {
324
            } catch (NullPointerException e) {
325
                // Probably because of a JDK bug that AbstractButton$ButtonActionPropertyChangeListener.propertyChange does not grok null values for "enabled" prop:
325
                // Probably because of a JDK bug that AbstractButton$ButtonActionPropertyChangeListener.propertyChange does not grok null values for "enabled" prop:
326
                ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "You cannot add " + getClass().getName() + " directly to a JMenu etc.; use org.openide.awt.Actions.connect instead", null, null, null); // NOI18N
326
                ErrorManager.getDefault().annotate(e, ErrorManager.DangerousUnknownConstant, "You cannot add " + getClass().getName() + " directly to a JMenu etc.; use org.openide.awt.Actions.connect instead", null, null, null); // NOI18N
327
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
327
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
328
            }
328
            }
329
        }
329
        }
(-)openide/options/src/org/openide/options/SystemOption.java (-1 / +1 lines)
Lines 352-358 Link Here
352
                            } catch (Exception ex) {
352
                            } catch (Exception ex) {
353
                                String msg = "Cannot call " + write + " for property " + getClass().getName() + "." +
353
                                String msg = "Cannot call " + write + " for property " + getClass().getName() + "." +
354
                                    name; // NOI18N
354
                                    name; // NOI18N
355
                                ErrorManager.getDefault().annotate(ex, ErrorManager.UNKNOWN, msg, null, null, null);
355
                                ErrorManager.getDefault().annotate(ex, ErrorManager.DangerousUnknownConstant, msg, null, null, null);
356
                                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
356
                                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
357
                            }
357
                            }
358
                        }
358
                        }
(-)openide/text/test/unit/src/org/openide/text/NotifyModifiedTest.java (-2 / +2 lines)
Lines 720-726 Link Here
720
        
720
        
721
        protected void notifyUnmodified () {
721
        protected void notifyUnmodified () {
722
            notifyUnmodified++;
722
            notifyUnmodified++;
723
            ErrManager.getDefault ().notify (new Exception ("notifyUnmodified: " + notifyUnmodified));
723
            ErrManager.getDefault ().dangerousNotify (new Exception ("notifyUnmodified: " + notifyUnmodified));
724
            
724
            
725
            super.notifyUnmodified();
725
            super.notifyUnmodified();
726
        }
726
        }
Lines 732-738 Link Here
732
                return false;
732
                return false;
733
            }
733
            }
734
            
734
            
735
            ErrManager.getDefault ().notify (new Exception ("notifyModified: " + notifyModified));
735
            ErrManager.getDefault ().dangerousNotify (new Exception ("notifyModified: " + notifyModified));
736
            
736
            
737
            boolean retValue;            
737
            boolean retValue;            
738
            retValue = super.notifyModified();
738
            retValue = super.notifyModified();
(-)openide/util/src/org/openide/ErrorManager.java (-9 / +9 lines)
Lines 217-223 Link Here
217
     * May be used only in {@link #notify(int, Throwable)}
217
     * May be used only in {@link #notify(int, Throwable)}
218
     * and {@link #annotate(Throwable, int, String, String, Throwable, Date)}.
218
     * and {@link #annotate(Throwable, int, String, String, Throwable, Date)}.
219
     */
219
     */
220
    public static final int UNKNOWN = 0x00000000;
220
    public static final int DangerousUnknownConstant = 0x00000000;
221
221
222
    /** Message that would be useful for tracing events but which need not be a problem. */
222
    /** Message that would be useful for tracing events but which need not be a problem. */
223
    public static final int INFORMATIONAL = 0x00000001;
223
    public static final int INFORMATIONAL = 0x00000001;
Lines 324-331 Link Here
324
     * @see #UNKNOWN
324
     * @see #UNKNOWN
325
     * @see #notify(int, Throwable)
325
     * @see #notify(int, Throwable)
326
    */
326
    */
327
    public final void notify(Throwable t) {
327
    public final void dangerousNotify(Throwable t) {
328
        notify(UNKNOWN, t);
328
        notify(DangerousUnknownConstant, t);
329
    }
329
    }
330
330
331
    /** Logs the message to a file and (possibly) tells the user.
331
    /** Logs the message to a file and (possibly) tells the user.
Lines 402-408 Link Here
402
    * @return the same exception <code>t</code> (as a convenience)
402
    * @return the same exception <code>t</code> (as a convenience)
403
    */
403
    */
404
    public final Throwable annotate(Throwable t, String localizedMessage) {
404
    public final Throwable annotate(Throwable t, String localizedMessage) {
405
        return annotate(t, UNKNOWN, null, localizedMessage, null, null);
405
        return annotate(t, DangerousUnknownConstant, null, localizedMessage, null, null);
406
    }
406
    }
407
407
408
    /** Annotates target exception with given exception. All the
408
    /** Annotates target exception with given exception. All the
Lines 417-423 Link Here
417
    * @return the same exception <code>target</code> (as a convenience)
417
    * @return the same exception <code>target</code> (as a convenience)
418
    */
418
    */
419
    public final Throwable annotate(Throwable target, Throwable t) {
419
    public final Throwable annotate(Throwable target, Throwable t) {
420
        return annotate(target, UNKNOWN, null, null, t, null);
420
        return annotate(target, DangerousUnknownConstant, null, null, t, null);
421
    }
421
    }
422
422
423
    /** Takes annotations from one exception and associates
423
    /** Takes annotations from one exception and associates
Lines 447-453 Link Here
447
                   );
447
                   );
448
        } else {
448
        } else {
449
        */
449
        */
450
        return annotate(t, UNKNOWN, null, null, copyFrom, null);
450
        return annotate(t, DangerousUnknownConstant, null, null, copyFrom, null);
451
451
452
        /*
452
        /*
453
        }
453
        }
Lines 596-602 Link Here
596
596
597
        /** Calls all delegates. */
597
        /** Calls all delegates. */
598
        public void log(int severity, String s) {
598
        public void log(int severity, String s) {
599
            if (severity == UNKNOWN) {
599
            if (severity == DangerousUnknownConstant) {
600
                throw new IllegalArgumentException("ErrorManager.log(UNKNOWN, ...) is not permitted"); // NOI18N
600
                throw new IllegalArgumentException("ErrorManager.log(UNKNOWN, ...) is not permitted"); // NOI18N
601
            }
601
            }
602
602
Lines 630-636 Link Here
630
630
631
        /** Calls all delegates. */
631
        /** Calls all delegates. */
632
        public boolean isLoggable(int severity) {
632
        public boolean isLoggable(int severity) {
633
            if (severity == UNKNOWN) {
633
            if (severity == DangerousUnknownConstant) {
634
                throw new IllegalArgumentException("ErrorManager.isLoggable(UNKNOWN) is not permitted"); // NOI18N
634
                throw new IllegalArgumentException("ErrorManager.isLoggable(UNKNOWN) is not permitted"); // NOI18N
635
            }
635
            }
636
636
Lines 651-657 Link Here
651
651
652
        /** Calls all delegates. */
652
        /** Calls all delegates. */
653
        public boolean isNotifiable(int severity) {
653
        public boolean isNotifiable(int severity) {
654
            if (severity == UNKNOWN) {
654
            if (severity == DangerousUnknownConstant) {
655
                throw new IllegalArgumentException("ErrorManager.isNotifiable(UNKNOWN) is not permitted"); // NOI18N
655
                throw new IllegalArgumentException("ErrorManager.isNotifiable(UNKNOWN) is not permitted"); // NOI18N
656
            }
656
            }
657
657
(-)openide/util/src/org/openide/util/NbBundle.java (-3 / +3 lines)
Lines 418-428 Link Here
418
418
419
            if (Lookup.getDefault().lookup(ClassLoader.class) == null) {
419
            if (Lookup.getDefault().lookup(ClassLoader.class) == null) {
420
                ErrorManager.getDefault().annotate(
420
                ErrorManager.getDefault().annotate(
421
                    e, ErrorManager.UNKNOWN, "Class loader not yet initialized in lookup", null, null, null
421
                    e, ErrorManager.DangerousUnknownConstant, "Class loader not yet initialized in lookup", null, null, null
422
                ); // NOI18N
422
                ); // NOI18N
423
            } else {
423
            } else {
424
                ErrorManager.getDefault().annotate(
424
                ErrorManager.getDefault().annotate(
425
                    e, ErrorManager.UNKNOWN, "Offending classloader: " + loader, null, null, null
425
                    e, ErrorManager.DangerousUnknownConstant, "Offending classloader: " + loader, null, null, null
426
                ); // NOI18N
426
                ); // NOI18N
427
            }
427
            }
428
428
Lines 540-546 Link Here
540
                    }
540
                    }
541
                } catch (IOException e) {
541
                } catch (IOException e) {
542
                    ErrorManager.getDefault().annotate(
542
                    ErrorManager.getDefault().annotate(
543
                        e, ErrorManager.UNKNOWN, "While loading: " + res, null, null, null
543
                        e, ErrorManager.DangerousUnknownConstant, "While loading: " + res, null, null, null
544
                    ); // NOI18N
544
                    ); // NOI18N
545
                    ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
545
                    ErrorManager.getDefault().notify(ErrorManager.WARNING, e);
546
546
(-)openide/util/src/org/openide/util/SharedClassObject.java (-1 / +1 lines)
Lines 718-724 Link Here
718
                } catch (Exception ex) {
718
                } catch (Exception ex) {
719
                    // checked or runtime does not matter - we must survive
719
                    // checked or runtime does not matter - we must survive
720
                    String banner = "Skipping " + object.getClass() + " resolution:"; //NOI18N
720
                    String banner = "Skipping " + object.getClass() + " resolution:"; //NOI18N
721
                    err.annotate(ex, ErrorManager.UNKNOWN, banner, null, null, null);
721
                    err.annotate(ex, ErrorManager.DangerousUnknownConstant, banner, null, null, null);
722
                    err.notify(ErrorManager.INFORMATIONAL, ex);
722
                    err.notify(ErrorManager.INFORMATIONAL, ex);
723
                } finally {
723
                } finally {
724
                    resolveMethod.setAccessible(false);
724
                    resolveMethod.setAccessible(false);
(-)openide/util/src/org/openide/util/Utilities.java (-3 / +3 lines)
Lines 360-372 Link Here
360
            bi = java.beans.Introspector.getBeanInfo(clazz);
360
            bi = java.beans.Introspector.getBeanInfo(clazz);
361
        } catch (java.beans.IntrospectionException ie) {
361
        } catch (java.beans.IntrospectionException ie) {
362
            ErrorManager.getDefault().annotate(
362
            ErrorManager.getDefault().annotate(
363
                ie, ErrorManager.UNKNOWN, "Encountered while introspecting " + clazz.getName(), null, null, null
363
                ie, ErrorManager.DangerousUnknownConstant, "Encountered while introspecting " + clazz.getName(), null, null, null
364
            ); // NOI18N
364
            ); // NOI18N
365
            throw ie;
365
            throw ie;
366
        } catch (Error e) {
366
        } catch (Error e) {
367
            // Could be a bug in Introspector triggered by NB code.
367
            // Could be a bug in Introspector triggered by NB code.
368
            ErrorManager.getDefault().annotate(
368
            ErrorManager.getDefault().annotate(
369
                e, ErrorManager.UNKNOWN, "Encountered while introspecting " + clazz.getName(), null, null, null
369
                e, ErrorManager.DangerousUnknownConstant, "Encountered while introspecting " + clazz.getName(), null, null, null
370
            ); // NOI18N
370
            ); // NOI18N
371
            throw e;
371
            throw e;
372
        }
372
        }
Lines 2456-2462 Link Here
2456
                reader.close();
2456
                reader.close();
2457
            } catch (IOException ex) {
2457
            } catch (IOException ex) {
2458
                ErrorManager.getDefault().annotate(
2458
                ErrorManager.getDefault().annotate(
2459
                    ex, ErrorManager.UNKNOWN, "Problematic file: " + u, null, null, null
2459
                    ex, ErrorManager.DangerousUnknownConstant, "Problematic file: " + u, null, null, null
2460
                );
2460
                );
2461
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
2461
                ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, ex);
2462
            }
2462
            }
(-)openide/util/src/org/openide/util/io/NbMarshalledObject.java (-1 / +1 lines)
Lines 112-118 Link Here
112
                buf.append(HEX[b % 16]);
112
                buf.append(HEX[b % 16]);
113
            }
113
            }
114
114
115
            ErrorManager.getDefault().annotate(ioe, ErrorManager.UNKNOWN, buf.toString(), null, weird, null);
115
            ErrorManager.getDefault().annotate(ioe, ErrorManager.DangerousUnknownConstant, buf.toString(), null, weird, null);
116
            throw ioe;
116
            throw ioe;
117
        } finally {
117
        } finally {
118
            ois.close();
118
            ois.close();
(-)openide/util/test/unit/src/org/openide/ErrorManagerTest.java (-1 / +1 lines)
Lines 53-59 Link Here
53
        ErrManager.get ().assertNotify (ErrManager.INFORMATIONAL, t);
53
        ErrManager.get ().assertNotify (ErrManager.INFORMATIONAL, t);
54
        t = new Throwable ();
54
        t = new Throwable ();
55
        ErrorManager.getDefault ().notify (t);
55
        ErrorManager.getDefault ().notify (t);
56
        ErrManager.get ().assertNotify (ErrManager.UNKNOWN, t);
56
        ErrManager.get ().assertNotify (ErrManager.DangerousUnknownConstant, t);
57
    }
57
    }
58
    
58
    
59
    /** Test of log method, of class org.openide.ErrorManager. */
59
    /** Test of log method, of class org.openide.ErrorManager. */
(-)openidex/src/org/openidex/search/SearchTypeBeanInfo.java (-3 / +3 lines)
Lines 47-53 Link Here
47
            properties[1].setHidden ( true );
47
            properties[1].setHidden ( true );
48
    	    return properties;
48
    	    return properties;
49
        } catch( IntrospectionException e) {
49
        } catch( IntrospectionException e) {
50
	    ErrorManager.getDefault().notify(e);
50
	    ErrorManager.getDefault().dangerousNotify(e);
51
	    return null;
51
	    return null;
52
        }
52
        }
53
    }
53
    }
Lines 65-71 Link Here
65
        	new EventSetDescriptor ( SearchType.class, "propertyChangeListener", PropertyChangeListener.class, new String[0], "addPropertyChangeListener", "removePropertyChangeListener" ) // NOI18N
65
        	new EventSetDescriptor ( SearchType.class, "propertyChangeListener", PropertyChangeListener.class, new String[0], "addPropertyChangeListener", "removePropertyChangeListener" ) // NOI18N
66
	    };
66
	    };
67
        } catch( IntrospectionException e) {
67
        } catch( IntrospectionException e) {
68
	    ErrorManager.getDefault().notify(e);
68
	    ErrorManager.getDefault().dangerousNotify(e);
69
	    return null;
69
	    return null;
70
        }
70
        }
71
    }
71
    }
Lines 110-116 Link Here
110
        try {
110
        try {
111
            return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) };
111
            return new BeanInfo[] { Introspector.getBeanInfo (org.openide.ServiceType.class) };
112
        } catch (IntrospectionException ie) {
112
        } catch (IntrospectionException ie) {
113
	    ErrorManager.getDefault().notify(ie);
113
	    ErrorManager.getDefault().dangerousNotify(ie);
114
            return null;
114
            return null;
115
        }
115
        }
116
    }
116
    }
(-)projects/libraries/src/org/netbeans/modules/project/libraries/LibrariesStorage.java (-16 / +16 lines)
Lines 131-151 Link Here
131
                        }
131
                        }
132
                    }
132
                    }
133
                } catch (SAXException e) {
133
                } catch (SAXException e) {
134
                    ErrorManager.getDefault().notify (e);
134
                    ErrorManager.getDefault().dangerousNotify (e);
135
                } catch (javax.xml.parsers.ParserConfigurationException e) {
135
                } catch (javax.xml.parsers.ParserConfigurationException e) {
136
                    ErrorManager.getDefault().notify (e);
136
                    ErrorManager.getDefault().dangerousNotify (e);
137
                } catch (java.io.IOException e) {
137
                } catch (java.io.IOException e) {
138
                    ErrorManager.getDefault().notify (e);
138
                    ErrorManager.getDefault().dangerousNotify (e);
139
                } catch (RuntimeException e) {
139
                } catch (RuntimeException e) {
140
                    // Other problem.
140
                    // Other problem.
141
                    ErrorManager.getDefault().notify (e);
141
                    ErrorManager.getDefault().dangerousNotify (e);
142
                }
142
                }
143
            }
143
            }
144
        }
144
        }
145
        try {
145
        try {
146
            saveTimeStamps();
146
            saveTimeStamps();
147
        } catch (IOException ioe) {
147
        } catch (IOException ioe) {
148
            ErrorManager.getDefault().notify(ioe);
148
            ErrorManager.getDefault().dangerousNotify(ioe);
149
        }       
149
        }       
150
    }
150
    }
151
    
151
    
Lines 187-193 Link Here
187
        try {
187
        try {
188
            parser.parse(input);
188
            parser.parse(input);
189
        } catch (SAXException e) {
189
        } catch (SAXException e) {
190
            ErrorManager.getDefault().annotate(e, ErrorManager.UNKNOWN, "From " + baseURL, null, null, null);
190
            ErrorManager.getDefault().annotate(e, ErrorManager.DangerousUnknownConstant, "From " + baseURL, null, null, null);
191
            throw e;
191
            throw e;
192
        }
192
        }
193
    }
193
    }
Lines 348-364 Link Here
348
                        saveTimeStamps();
348
                        saveTimeStamps();
349
                    } catch (RuntimeException e) {
349
                    } catch (RuntimeException e) {
350
                        String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
350
                        String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
351
                        ErrorManager.getDefault().notify(ErrorManager.getDefault().annotate(e,message));
351
                        ErrorManager.getDefault().dangerousNotify(ErrorManager.getDefault().annotate(e,message));
352
                    }
352
                    }
353
                    this.fireLibrariesChanged();
353
                    this.fireLibrariesChanged();
354
                }
354
                }
355
            }            
355
            }            
356
        } catch (SAXException e) {
356
        } catch (SAXException e) {
357
            ErrorManager.getDefault().notify (e);
357
            ErrorManager.getDefault().dangerousNotify (e);
358
        } catch (javax.xml.parsers.ParserConfigurationException e) {
358
        } catch (javax.xml.parsers.ParserConfigurationException e) {
359
            ErrorManager.getDefault().notify (e);
359
            ErrorManager.getDefault().dangerousNotify (e);
360
        } catch (IOException e) {
360
        } catch (IOException e) {
361
            ErrorManager.getDefault().notify (e);
361
            ErrorManager.getDefault().dangerousNotify (e);
362
        }
362
        }
363
    }
363
    }
364
364
Lines 383-389 Link Here
383
                    provider.libraryDeleted (impl);
383
                    provider.libraryDeleted (impl);
384
                } catch (RuntimeException e) {
384
                } catch (RuntimeException e) {
385
                    String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryDeletedError");
385
                    String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryDeletedError");
386
                    ErrorManager.getDefault().notify(ErrorManager.getDefault().annotate(e,message));
386
                    ErrorManager.getDefault().dangerousNotify(ErrorManager.getDefault().annotate(e,message));
387
                }
387
                }
388
            }
388
            }
389
            this.fireLibrariesChanged();
389
            this.fireLibrariesChanged();
Lines 411-424 Link Here
411
                    saveTimeStamps();
411
                    saveTimeStamps();
412
                } catch (RuntimeException e) {
412
                } catch (RuntimeException e) {
413
                    String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
413
                    String message = NbBundle.getMessage(LibrariesStorage.class,"MSG_libraryCreatedError");
414
                    ErrorManager.getDefault().notify(ErrorManager.getDefault().annotate(e,message));
414
                    ErrorManager.getDefault().dangerousNotify(ErrorManager.getDefault().annotate(e,message));
415
                }                
415
                }                
416
            } catch (SAXException se) {
416
            } catch (SAXException se) {
417
                ErrorManager.getDefault().notify(se);
417
                ErrorManager.getDefault().dangerousNotify(se);
418
            } catch (ParserConfigurationException pce) {
418
            } catch (ParserConfigurationException pce) {
419
                ErrorManager.getDefault().notify(pce);
419
                ErrorManager.getDefault().dangerousNotify(pce);
420
            } catch (IOException ioe) {
420
            } catch (IOException ioe) {
421
                ErrorManager.getDefault().notify(ioe);
421
                ErrorManager.getDefault().dangerousNotify(ioe);
422
            }
422
            }
423
        }
423
        }
424
    }
424
    }
Lines 486-492 Link Here
486
                            this.timeStamps.clear();
486
                            this.timeStamps.clear();
487
                        }
487
                        }
488
                    } catch (IOException ioe) {
488
                    } catch (IOException ioe) {
489
                        ErrorManager.getDefault().notify(ioe);
489
                        ErrorManager.getDefault().dangerousNotify(ioe);
490
                    }
490
                    }
491
                }
491
                }
492
            }
492
            }
(-)projects/libraries/src/org/netbeans/modules/project/libraries/LibraryTypeRegistry.java (-4 / +4 lines)
Lines 55-64 Link Here
55
        try {
55
        try {
56
            return (LibraryTypeProvider[]) this.instanceCreate ();
56
            return (LibraryTypeProvider[]) this.instanceCreate ();
57
        } catch (IOException ioe) {
57
        } catch (IOException ioe) {
58
            ErrorManager.getDefault().notify(ioe);
58
            ErrorManager.getDefault().dangerousNotify(ioe);
59
        }
59
        }
60
        catch (ClassNotFoundException cnf) {
60
        catch (ClassNotFoundException cnf) {
61
            ErrorManager.getDefault().notify(cnf);
61
            ErrorManager.getDefault().dangerousNotify(cnf);
62
        }
62
        }
63
        return new LibraryTypeProvider[0];
63
        return new LibraryTypeProvider[0];
64
    }
64
    }
Lines 72-81 Link Here
72
                    return providers[i];
72
                    return providers[i];
73
            }
73
            }
74
        } catch (IOException ioe) {
74
        } catch (IOException ioe) {
75
            ErrorManager.getDefault().notify (ioe);
75
            ErrorManager.getDefault().dangerousNotify (ioe);
76
        }
76
        }
77
        catch (ClassNotFoundException cnfe) {
77
        catch (ClassNotFoundException cnfe) {
78
            ErrorManager.getDefault().notify (cnfe);
78
            ErrorManager.getDefault().dangerousNotify (cnfe);
79
        }
79
        }
80
        return null;
80
        return null;
81
    }
81
    }
(-)projects/libraries/src/org/netbeans/modules/project/libraries/ui/LibrariesCustomizer.java (-1 / +1 lines)
Lines 102-108 Link Here
102
            this.model.apply();
102
            this.model.apply();
103
            return true;
103
            return true;
104
        } catch (IOException ioe) {
104
        } catch (IOException ioe) {
105
            ErrorManager.getDefault().notify(ioe);
105
            ErrorManager.getDefault().dangerousNotify(ioe);
106
            return false;
106
            return false;
107
        }
107
        }
108
    }
108
    }
(-)serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/config/EarDeploymentConfiguration.java (-3 / +3 lines)
Lines 54-60 Link Here
54
            try {
54
            try {
55
                dataObject = dataObject.find(FileUtil.toFileObject(file));
55
                dataObject = dataObject.find(FileUtil.toFileObject(file));
56
            } catch(DataObjectNotFoundException donfe) {
56
            } catch(DataObjectNotFoundException donfe) {
57
                ErrorManager.getDefault().notify(donfe);
57
                ErrorManager.getDefault().dangerousNotify(donfe);
58
            }
58
            }
59
        }
59
        }
60
    }
60
    }
Lines 73-79 Link Here
73
                    try {
73
                    try {
74
                        jbossApp = jbossApp.createGraph(file);
74
                        jbossApp = jbossApp.createGraph(file);
75
                    } catch (IOException ioe) {
75
                    } catch (IOException ioe) {
76
                        ErrorManager.getDefault().notify(ioe);
76
                        ErrorManager.getDefault().dangerousNotify(ioe);
77
                    } catch (RuntimeException re) {
77
                    } catch (RuntimeException re) {
78
                        // jboss-app.xml is not parseable, do nothing
78
                        // jboss-app.xml is not parseable, do nothing
79
                    }
79
                    }
Lines 83-89 Link Here
83
                    writefile(file, jbossApp);
83
                    writefile(file, jbossApp);
84
                }
84
                }
85
            } catch (ConfigurationException ce) {
85
            } catch (ConfigurationException ce) {
86
                ErrorManager.getDefault().notify(ce);
86
                ErrorManager.getDefault().dangerousNotify(ce);
87
            }
87
            }
88
        }
88
        }
89
        return jbossApp;
89
        return jbossApp;
(-)serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/config/EjbDeploymentConfiguration.java (-3 / +3 lines)
Lines 54-60 Link Here
54
            try {
54
            try {
55
                dataObject = dataObject.find(FileUtil.toFileObject(file));
55
                dataObject = dataObject.find(FileUtil.toFileObject(file));
56
            } catch(DataObjectNotFoundException donfe) {
56
            } catch(DataObjectNotFoundException donfe) {
57
                ErrorManager.getDefault().notify(donfe);
57
                ErrorManager.getDefault().dangerousNotify(donfe);
58
            }
58
            }
59
        }
59
        }
60
    }
60
    }
Lines 73-79 Link Here
73
                    try {
73
                    try {
74
                        jboss = jboss.createGraph(file);
74
                        jboss = jboss.createGraph(file);
75
                    } catch (IOException ioe) {
75
                    } catch (IOException ioe) {
76
                        ErrorManager.getDefault().notify(ioe);
76
                        ErrorManager.getDefault().dangerousNotify(ioe);
77
                    } catch (RuntimeException re) {
77
                    } catch (RuntimeException re) {
78
                        // jboss.xml is not parseable, do nothing
78
                        // jboss.xml is not parseable, do nothing
79
                    }
79
                    }
Lines 83-89 Link Here
83
                    writefile(file, jboss);
83
                    writefile(file, jboss);
84
                }
84
                }
85
            } catch (ConfigurationException ce) {
85
            } catch (ConfigurationException ce) {
86
                ErrorManager.getDefault().notify(ce);
86
                ErrorManager.getDefault().dangerousNotify(ce);
87
            }
87
            }
88
        }
88
        }
89
        return jboss;
89
        return jboss;
(-)serverplugins/jboss4/src/org/netbeans/modules/j2ee/jboss4/config/WarDeploymentConfiguration.java (-5 / +5 lines)
Lines 70-76 Link Here
70
                dataObject = dataObject.find(FileUtil.toFileObject(file));
70
                dataObject = dataObject.find(FileUtil.toFileObject(file));
71
                dataObject.addPropertyChangeListener(this);
71
                dataObject.addPropertyChangeListener(this);
72
            } catch(DataObjectNotFoundException donfe) {
72
            } catch(DataObjectNotFoundException donfe) {
73
                ErrorManager.getDefault().notify(donfe);
73
                ErrorManager.getDefault().dangerousNotify(donfe);
74
            }
74
            }
75
        }
75
        }
76
    }
76
    }
Lines 141-147 Link Here
141
                    try {
141
                    try {
142
                        jbossWeb = JbossWeb.createGraph(file);
142
                        jbossWeb = JbossWeb.createGraph(file);
143
                    } catch (IOException ioe) {
143
                    } catch (IOException ioe) {
144
                        ErrorManager.getDefault().notify(ioe);
144
                        ErrorManager.getDefault().dangerousNotify(ioe);
145
                    } catch (RuntimeException re) {
145
                    } catch (RuntimeException re) {
146
                        // jboss-web.xml is not parseable, do nothing
146
                        // jboss-web.xml is not parseable, do nothing
147
                    }
147
                    }
Lines 151-157 Link Here
151
                    writefile(file, jbossWeb);
151
                    writefile(file, jbossWeb);
152
                }
152
                }
153
            } catch (ConfigurationException ce) {
153
            } catch (ConfigurationException ce) {
154
                ErrorManager.getDefault().notify(ce);
154
                ErrorManager.getDefault().dangerousNotify(ce);
155
            }
155
            }
156
        }
156
        }
157
        return jbossWeb;
157
        return jbossWeb;
Lines 250-256 Link Here
250
        try {
250
        try {
251
            graph.write(out);
251
            graph.write(out);
252
        } catch (IOException ioe) {
252
        } catch (IOException ioe) {
253
            ErrorManager.getDefault().notify(ioe);
253
            ErrorManager.getDefault().dangerousNotify(ioe);
254
        }
254
        }
255
        NbDocument.runAtomic(doc, new Runnable() {
255
        NbDocument.runAtomic(doc, new Runnable() {
256
            public void run() {
256
            public void run() {
Lines 258-264 Link Here
258
                    doc.remove(0, doc.getLength());
258
                    doc.remove(0, doc.getLength());
259
                    doc.insertString(0, out.toString(), null);
259
                    doc.insertString(0, out.toString(), null);
260
                } catch (BadLocationException ble) {
260
                } catch (BadLocationException ble) {
261
                    ErrorManager.getDefault().notify(ble);
261
                    ErrorManager.getDefault().dangerousNotify(ble);
262
                }
262
                }
263
            }
263
            }
264
        });
264
        });
(-)tasklist/api/src/org/netbeans/modules/tasklist/providers/JavaSuggestionContext.java (-4 / +4 lines)
Lines 71-77 Link Here
71
                DataObject do_ = DataObject.find(fo);
71
                DataObject do_ = DataObject.find(fo);
72
                result = new SuggestionContext(do_).getCharSequence().toString();
72
                result = new SuggestionContext(do_).getCharSequence().toString();
73
            } catch (DataObjectNotFoundException e) {
73
            } catch (DataObjectNotFoundException e) {
74
                ErrorManager.getDefault().notify(e);
74
                ErrorManager.getDefault().dangerousNotify(e);
75
            }
75
            }
76
        } else {
76
        } else {
77
            try {
77
            try {
Lines 83-93 Link Here
83
                    new Object[] {fo, Boolean.FALSE, Boolean.TRUE, encoding});
83
                    new Object[] {fo, Boolean.FALSE, Boolean.TRUE, encoding});
84
                result = new String(source);
84
                result = new String(source);
85
            } catch (InvocationTargetException e) {
85
            } catch (InvocationTargetException e) {
86
                ErrorManager.getDefault().notify(e);
86
                ErrorManager.getDefault().dangerousNotify(e);
87
            } catch (IllegalArgumentException e) {
87
            } catch (IllegalArgumentException e) {
88
                ErrorManager.getDefault().notify(e);
88
                ErrorManager.getDefault().dangerousNotify(e);
89
            } catch (IllegalAccessException e) {
89
            } catch (IllegalAccessException e) {
90
                ErrorManager.getDefault().notify(e);
90
                ErrorManager.getDefault().dangerousNotify(e);
91
            }
91
            }
92
        }
92
        }
93
        return result;
93
        return result;
(-)tasklist/api/src/org/netbeans/modules/tasklist/providers/PropertiesSuggestionContext.java (-1 / +1 lines)
Lines 45-51 Link Here
45
                r.close();
45
                r.close();
46
            }
46
            }
47
        } catch (IOException e) {
47
        } catch (IOException e) {
48
            ErrorManager.getDefault().notify(e);
48
            ErrorManager.getDefault().dangerousNotify(e);
49
        }
49
        }
50
        return null;
50
        return null;
51
    }
51
    }
(-)tasklist/api/src/org/netbeans/modules/tasklist/providers/SuggestionContext.java (-1 / +1 lines)
Lines 85-91 Link Here
85
                    doc = edit.openDocument(); // DOES block
85
                    doc = edit.openDocument(); // DOES block
86
                    cachedString = extractString(doc);
86
                    cachedString = extractString(doc);
87
                } catch (IOException e) {
87
                } catch (IOException e) {
88
                    ErrorManager.getDefault().notify(e);
88
                    ErrorManager.getDefault().dangerousNotify(e);
89
                }
89
                }
90
            }
90
            }
91
        }
91
        }
(-)tasklist/api/src/org/netbeans/modules/tasklist/providers/XMLSuggestionContext.java (-1 / +1 lines)
Lines 55-61 Link Here
55
                r.close();
55
                r.close();
56
            }
56
            }
57
        } catch (IOException e) {
57
        } catch (IOException e) {
58
            ErrorManager.getDefault().notify(e);
58
            ErrorManager.getDefault().dangerousNotify(e);
59
        }
59
        }
60
        return null;
60
        return null;
61
    }
61
    }
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/SuggestionNodeProperty.java (-2 / +2 lines)
Lines 40-48 Link Here
40
      try {
40
      try {
41
	return (PropertyEditor) propertyEditorClass.newInstance ();
41
	return (PropertyEditor) propertyEditorClass.newInstance ();
42
      } catch (InstantiationException ex) {
42
      } catch (InstantiationException ex) {
43
	ErrorManager.getDefault().notify(ex);
43
	ErrorManager.getDefault().dangerousNotify(ex);
44
      } catch (IllegalAccessException iex) {
44
      } catch (IllegalAccessException iex) {
45
	ErrorManager.getDefault().notify(iex);
45
	ErrorManager.getDefault().dangerousNotify(iex);
46
      }
46
      }
47
47
48
48
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/TaskListView.java (-7 / +7 lines)
Lines 421-431 Link Here
421
            InstanceCookie ic = (InstanceCookie) dobj.getCookie(InstanceCookie.class);
421
            InstanceCookie ic = (InstanceCookie) dobj.getCookie(InstanceCookie.class);
422
            cc = (ColumnsConfiguration) ic.instanceCreate();
422
            cc = (ColumnsConfiguration) ic.instanceCreate();
423
        } catch (ClassNotFoundException e) {
423
        } catch (ClassNotFoundException e) {
424
            ErrorManager.getDefault().notify(e);
424
            ErrorManager.getDefault().dangerousNotify(e);
425
        } catch (DataObjectNotFoundException e) {
425
        } catch (DataObjectNotFoundException e) {
426
            ErrorManager.getDefault().notify(e);
426
            ErrorManager.getDefault().dangerousNotify(e);
427
        } catch (IOException e) {
427
        } catch (IOException e) {
428
            ErrorManager.getDefault().notify(e);
428
            ErrorManager.getDefault().dangerousNotify(e);
429
        }
429
        }
430
        return cc;
430
        return cc;
431
    }
431
    }
Lines 460-470 Link Here
460
            }
460
            }
461
            
461
            
462
        } catch (ClassNotFoundException e) {
462
        } catch (ClassNotFoundException e) {
463
            ErrorManager.getDefault().notify(e);
463
            ErrorManager.getDefault().dangerousNotify(e);
464
        } catch (DataObjectNotFoundException e) {
464
        } catch (DataObjectNotFoundException e) {
465
            ErrorManager.getDefault().notify(e);
465
            ErrorManager.getDefault().dangerousNotify(e);
466
        } catch (IOException e) {
466
        } catch (IOException e) {
467
            ErrorManager.getDefault().notify(e);
467
            ErrorManager.getDefault().dangerousNotify(e);
468
        }
468
        }
469
        
469
        
470
    }
470
    }
Lines 1313-1319 Link Here
1313
        try {
1313
        try {
1314
            getExplorerManager().setSelectedNodes(new Node[0]);
1314
            getExplorerManager().setSelectedNodes(new Node[0]);
1315
        } catch (PropertyVetoException e) {
1315
        } catch (PropertyVetoException e) {
1316
            ErrorManager.getDefault().notify(e);
1316
            ErrorManager.getDefault().dangerousNotify(e);
1317
        }
1317
        }
1318
1318
1319
        setRoot();
1319
        setRoot();
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/columns/ColumnsConfigurationConvertor.java (-2 / +2 lines)
Lines 85-91 Link Here
85
            try {
85
            try {
86
                ww[i] = Integer.parseInt((String) w.get(i));
86
                ww[i] = Integer.parseInt((String) w.get(i));
87
            } catch (NumberFormatException e) {
87
            } catch (NumberFormatException e) {
88
                ErrorManager.getDefault().notify(e);
88
                ErrorManager.getDefault().dangerousNotify(e);
89
            }
89
            }
90
        }
90
        }
91
        String[] nn = (String[]) n.toArray(new String[n.size()]);
91
        String[] nn = (String[]) n.toArray(new String[n.size()]);
Lines 130-136 Link Here
130
        try {
130
        try {
131
            saver.requestSave();
131
            saver.requestSave();
132
        } catch (IOException e) {
132
        } catch (IOException e) {
133
            ErrorManager.getDefault().notify(e);
133
            ErrorManager.getDefault().dangerousNotify(e);
134
        }
134
        }
135
    }
135
    }
136
}
136
}
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/filter/FilterConvertor.java (-1 / +1 lines)
Lines 129-135 Link Here
129
        try {
129
        try {
130
            saver.requestSave();
130
            saver.requestSave();
131
        } catch (IOException e) {
131
        } catch (IOException e) {
132
            ErrorManager.getDefault().notify(e);
132
            ErrorManager.getDefault().dangerousNotify(e);
133
        }
133
        }
134
    }
134
    }
135
    
135
    
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/filter/FilterRepositoryConvertor.java (-1 / +1 lines)
Lines 110-116 Link Here
110
        try {
110
        try {
111
            saver.requestSave();
111
            saver.requestSave();
112
        } catch (IOException e) {
112
        } catch (IOException e) {
113
            ErrorManager.getDefault().notify(e);
113
            ErrorManager.getDefault().dangerousNotify(e);
114
        }
114
        }
115
    }
115
    }
116
    
116
    
(-)tasklist/core/src/org/netbeans/modules/tasklist/core/translators/HTMLSupport.java (-4 / +4 lines)
Lines 341-350 Link Here
341
                                writer.write(TLUtils.toHTML(prop.getValue().toString()));
341
                                writer.write(TLUtils.toHTML(prop.getValue().toString()));
342
                            } catch (java.lang.IllegalAccessException e) {
342
                            } catch (java.lang.IllegalAccessException e) {
343
                                writer.write("ERROR"); // NOI18N
343
                                writer.write("ERROR"); // NOI18N
344
                                ErrorManager.getDefault().notify(e);
344
                                ErrorManager.getDefault().dangerousNotify(e);
345
                            } catch (InvocationTargetException e) {
345
                            } catch (InvocationTargetException e) {
346
                                writer.write("ERROR"); // NOI18N
346
                                writer.write("ERROR"); // NOI18N
347
                                ErrorManager.getDefault().notify(e);
347
                                ErrorManager.getDefault().dangerousNotify(e);
348
                            }
348
                            }
349
            if (subtable) {
349
            if (subtable) {
350
                        writer.write("</TD>\n"); // NOI18N
350
                        writer.write("</TD>\n"); // NOI18N
Lines 361-370 Link Here
361
                    writer.write(TLUtils.toHTML(s));
361
                    writer.write(TLUtils.toHTML(s));
362
                } catch (java.lang.IllegalAccessException e) {
362
                } catch (java.lang.IllegalAccessException e) {
363
                    writer.write("ERROR"); // NOI18N
363
                    writer.write("ERROR"); // NOI18N
364
                    ErrorManager.getDefault().notify(e);
364
                    ErrorManager.getDefault().dangerousNotify(e);
365
                } catch (InvocationTargetException e) {
365
                } catch (InvocationTargetException e) {
366
                    writer.write("ERROR"); // NOI18N
366
                    writer.write("ERROR"); // NOI18N
367
                    ErrorManager.getDefault().notify(e);
367
                    ErrorManager.getDefault().dangerousNotify(e);
368
                }
368
                }
369
            writer.write("</TD>\n"); // NOI18N
369
            writer.write("</TD>\n"); // NOI18N
370
        }
370
        }
(-)web/jsf/src/org/netbeans/modules/web/jsf/JSFConfigDataObject.java (-1 / +1 lines)
Lines 182-188 Link Here
182
                doc.getFormatter().reformat(doc, 0, doc.getLength());
182
                doc.getFormatter().reformat(doc, 0, doc.getLength());
183
            }
183
            }
184
            catch (Exception e){
184
            catch (Exception e){
185
                ErrorManager.getDefault().notify(ex);
185
                ErrorManager.getDefault().dangerousNotify(ex);
186
            }
186
            }
187
            
187
            
188
        }
188
        }
(-)web/jsf/src/org/netbeans/modules/web/jsf/JSFConfigEditorSupport.java (-1 / +1 lines)
Lines 176-182 Link Here
176
                    getDataObject().setModified (false);
176
                    getDataObject().setModified (false);
177
177
178
                } catch (BadLocationException lex) {
178
                } catch (BadLocationException lex) {
179
                    org.openide.ErrorManager.getDefault().notify(lex);
179
                    org.openide.ErrorManager.getDefault().dangerousNotify(lex);
180
                }
180
                }
181
181
182
            } else { // NotifyDescriptor != YES_OPTION
182
            } else { // NotifyDescriptor != YES_OPTION
(-)web/jsf/src/org/netbeans/modules/web/jsf/JSFConfigLoaderBeanInfo.java (-1 / +1 lines)
Lines 29-35 Link Here
29
        try {
29
        try {
30
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
30
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
31
        } catch (IntrospectionException ie) {
31
        } catch (IntrospectionException ie) {
32
            ErrorManager.getDefault().notify(ie);
32
            ErrorManager.getDefault().dangerousNotify(ie);
33
            return null;
33
            return null;
34
        }
34
        }
35
    }
35
    }
(-)web/jsf/src/org/netbeans/modules/web/jsf/JSFConfigUtilities.java (-7 / +7 lines)
Lines 47-53 Link Here
47
            for (int i = 0; i < rules.length; i++)
47
            for (int i = 0; i < rules.length; i++)
48
                list.add(rules[i]);
48
                list.add(rules[i]);
49
        } catch (java.io.IOException e){
49
        } catch (java.io.IOException e){
50
            ErrorManager.getDefault().notify(e);
50
            ErrorManager.getDefault().dangerousNotify(e);
51
        }
51
        }
52
        return list;
52
        return list;
53
    }
53
    }
Lines 60-66 Link Here
60
            for (int i = 0; i < beans.length; i++)
60
            for (int i = 0; i < beans.length; i++)
61
                list.add(beans[i]);
61
                list.add(beans[i]);
62
        } catch (java.io.IOException e){
62
        } catch (java.io.IOException e){
63
            ErrorManager.getDefault().notify(e);
63
            ErrorManager.getDefault().dangerousNotify(e);
64
        }
64
        }
65
        return list;
65
        return list;
66
    }
66
    }
Lines 69-75 Link Here
69
        try {
69
        try {
70
            return findNavigationRule(data.getFacesConfig(), fromView);
70
            return findNavigationRule(data.getFacesConfig(), fromView);
71
        } catch (IOException ex) {
71
        } catch (IOException ex) {
72
            ErrorManager.getDefault().notify(ex);
72
            ErrorManager.getDefault().dangerousNotify(ex);
73
        }
73
        }
74
        return null;
74
        return null;
75
    }
75
    }
Lines 140-146 Link Here
140
                        return mappings[i].getUrlPattern();
140
                        return mappings[i].getUrlPattern();
141
                }
141
                }
142
            } catch (java.io.IOException e) {
142
            } catch (java.io.IOException e) {
143
                ErrorManager.getDefault().notify(e);
143
                ErrorManager.getDefault().dangerousNotify(e);
144
            }
144
            }
145
        }
145
        }
146
        return null;
146
        return null;
Lines 157-163 Link Here
157
                if (param != null)
157
                if (param != null)
158
                    value =   "true".equals(param.getParamValue().trim()); //NOI18N
158
                    value =   "true".equals(param.getParamValue().trim()); //NOI18N
159
            } catch (java.io.IOException e) {
159
            } catch (java.io.IOException e) {
160
                ErrorManager.getDefault().notify(e);
160
                ErrorManager.getDefault().dangerousNotify(e);
161
            }
161
            }
162
        }
162
        }
163
        return value;
163
        return value;
Lines 174-180 Link Here
174
                if (param != null)
174
                if (param != null)
175
                    value = "true".equals(param.getParamValue().trim());
175
                    value = "true".equals(param.getParamValue().trim());
176
            } catch (java.io.IOException e) {
176
            } catch (java.io.IOException e) {
177
                ErrorManager.getDefault().notify(e);
177
                ErrorManager.getDefault().dangerousNotify(e);
178
            }
178
            }
179
        }
179
        }
180
        return value;
180
        return value;
Lines 190-196 Link Here
190
            if (webApp != null)
190
            if (webApp != null)
191
                param = (InitParam)webApp.findBeanByName("InitParam", "ParamName", "javax.faces.CONFIG_FILES"); //NOI18N
191
                param = (InitParam)webApp.findBeanByName("InitParam", "ParamName", "javax.faces.CONFIG_FILES"); //NOI18N
192
        } catch (java.io.IOException e) {
192
        } catch (java.io.IOException e) {
193
          ErrorManager.getDefault().notify(e);  
193
          ErrorManager.getDefault().dangerousNotify(e);  
194
        }
194
        }
195
        
195
        
196
        if (param != null){
196
        if (param != null){
(-)web/jsf/src/org/netbeans/modules/web/jsf/JSFFrameworkProvider.java (-1 / +1 lines)
Lines 208-214 Link Here
208
                    
208
                    
209
                }
209
                }
210
                catch (ClassNotFoundException cnfe){
210
                catch (ClassNotFoundException cnfe){
211
                    ErrorManager.getDefault().notify(cnfe);
211
                    ErrorManager.getDefault().dangerousNotify(cnfe);
212
                }
212
                }
213
            }
213
            }
214
            
214
            
(-)web/jsf/src/org/netbeans/modules/web/jsf/dialogs/AddNavigationCaseDialog.java (-2 / +2 lines)
Lines 267-273 Link Here
267
                jComboBoxToView.setSelectedItem(res);
267
                jComboBoxToView.setSelectedItem(res);
268
            }
268
            }
269
        } catch (java.io.IOException ex) {
269
        } catch (java.io.IOException ex) {
270
            ErrorManager.getDefault().notify(ex);
270
            ErrorManager.getDefault().dangerousNotify(ex);
271
        }
271
        }
272
    }//GEN-LAST:event_jButtonToViewActionPerformed
272
    }//GEN-LAST:event_jButtonToViewActionPerformed
273
273
Lines 280-286 Link Here
280
                jComboBoxFromView.setSelectedItem(res);
280
                jComboBoxFromView.setSelectedItem(res);
281
            }
281
            }
282
        } catch (java.io.IOException ex) {
282
        } catch (java.io.IOException ex) {
283
            ErrorManager.getDefault().notify(ex);
283
            ErrorManager.getDefault().dangerousNotify(ex);
284
        }
284
        }
285
    }//GEN-LAST:event_jButtonFromViewActionPerformed
285
    }//GEN-LAST:event_jButtonFromViewActionPerformed
286
    
286
    
(-)web/jsf/src/org/netbeans/modules/web/jsf/dialogs/AddNavigationRuleDialog.java (-1 / +1 lines)
Lines 145-151 Link Here
145
                jTextFieldFromView.setText(res);
145
                jTextFieldFromView.setText(res);
146
            }
146
            }
147
        } catch (java.io.IOException ex) {
147
        } catch (java.io.IOException ex) {
148
            ErrorManager.getDefault().notify(ex);
148
            ErrorManager.getDefault().dangerousNotify(ex);
149
        }
149
        }
150
    }//GEN-LAST:event_jButtonBrowseActionPerformed
150
    }//GEN-LAST:event_jButtonBrowseActionPerformed
151
    
151
    
(-)web/jsf/src/org/netbeans/modules/web/jsf/editor/JSFConfigHyperlinkProvider.java (-2 / +2 lines)
Lines 157-163 Link Here
157
            
157
            
158
        } 
158
        } 
159
        catch (BadLocationException e) {
159
        catch (BadLocationException e) {
160
            ErrorManager.getDefault().notify(e);
160
            ErrorManager.getDefault().dangerousNotify(e);
161
        }
161
        }
162
        return null;
162
        return null;
163
    }
163
    }
Lines 219-225 Link Here
219
                dobj = DataObject.find(fObj);
219
                dobj = DataObject.find(fObj);
220
            }
220
            }
221
            catch (DataObjectNotFoundException e){
221
            catch (DataObjectNotFoundException e){
222
               ErrorManager.getDefault().notify(e);
222
               ErrorManager.getDefault().dangerousNotify(e);
223
               return; 
223
               return; 
224
            }
224
            }
225
            if (dobj != null){
225
            if (dobj != null){
(-)web/jsf/src/org/netbeans/modules/web/jsf/editor/JSFEditorUtilities.java (-5 / +5 lines)
Lines 77-83 Link Here
77
            }
77
            }
78
        } 
78
        } 
79
        catch (BadLocationException e) {
79
        catch (BadLocationException e) {
80
            ErrorManager.getDefault().notify(e);
80
            ErrorManager.getDefault().dangerousNotify(e);
81
        }
81
        }
82
        return null;
82
        return null;
83
    }
83
    }
Lines 128-134 Link Here
128
            }
128
            }
129
        }
129
        }
130
        catch (BadLocationException e) {
130
        catch (BadLocationException e) {
131
            ErrorManager.getDefault().notify(e);
131
            ErrorManager.getDefault().dangerousNotify(e);
132
        } 
132
        } 
133
        return new int []{-1,-1};
133
        return new int []{-1,-1};
134
    }
134
    }
Lines 154-160 Link Here
154
            }
154
            }
155
        }
155
        }
156
        catch (BadLocationException e) {
156
        catch (BadLocationException e) {
157
            ErrorManager.getDefault().notify(e);
157
            ErrorManager.getDefault().dangerousNotify(e);
158
        }
158
        }
159
        return possition;
159
        return possition;
160
    }
160
    }
Lines 203-209 Link Here
203
                    possition = writeString(doc, sBean, token.getOffset());    
203
                    possition = writeString(doc, sBean, token.getOffset());    
204
            }
204
            }
205
        } catch (BadLocationException ex) {
205
        } catch (BadLocationException ex) {
206
            ErrorManager.getDefault().notify(ex);
206
            ErrorManager.getDefault().dangerousNotify(ex);
207
        }
207
        }
208
        return possition;
208
        return possition;
209
    }
209
    }
Lines 225-231 Link Here
225
            formatLength = doc.getFormatter().reformat(doc, offset, offset + text.length()-1);
225
            formatLength = doc.getFormatter().reformat(doc, offset, offset + text.length()-1);
226
        }
226
        }
227
        catch(BadLocationException ex){
227
        catch(BadLocationException ex){
228
            ErrorManager.getDefault().notify(ex);
228
            ErrorManager.getDefault().dangerousNotify(ex);
229
        }
229
        }
230
        finally {
230
        finally {
231
            doc.atomicUnlock();
231
            doc.atomicUnlock();
(-)web/jsf/src/org/netbeans/modules/web/jsf/editor/JSFPopupAction.java (-3 / +3 lines)
Lines 122-128 Link Here
122
                    target.setCaretPosition(JSFEditorUtilities.writeBean(doc, bean, "managed-bean"));             //NOI18N
122
                    target.setCaretPosition(JSFEditorUtilities.writeBean(doc, bean, "managed-bean"));             //NOI18N
123
                } 
123
                } 
124
                catch (java.io.IOException ex) {
124
                catch (java.io.IOException ex) {
125
                    ErrorManager.getDefault().notify(ex);
125
                    ErrorManager.getDefault().dangerousNotify(ex);
126
                }
126
                }
127
                
127
                
128
            }
128
            }
Lines 158-164 Link Here
158
                    target.setCaretPosition(JSFEditorUtilities.writeBean(doc, rule, "navigation-rule"));    //NOI18N
158
                    target.setCaretPosition(JSFEditorUtilities.writeBean(doc, rule, "navigation-rule"));    //NOI18N
159
                } 
159
                } 
160
                catch (java.io.IOException ex) {
160
                catch (java.io.IOException ex) {
161
                    ErrorManager.getDefault().notify(ex);
161
                    ErrorManager.getDefault().dangerousNotify(ex);
162
                }
162
                }
163
            }
163
            }
164
        }
164
        }
Lines 210-216 Link Here
210
                        target.setCaretPosition(JSFEditorUtilities.writeCaseIntoRule(doc, rule.getFromViewId(), nCase ));
210
                        target.setCaretPosition(JSFEditorUtilities.writeCaseIntoRule(doc, rule.getFromViewId(), nCase ));
211
                } 
211
                } 
212
                catch (java.io.IOException ex) {
212
                catch (java.io.IOException ex) {
213
                    ErrorManager.getDefault().notify(ex);
213
                    ErrorManager.getDefault().dangerousNotify(ex);
214
                }
214
                }
215
            }
215
            }
216
        }
216
        }
(-)web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPHyperlinkProvider.java (-4 / +4 lines)
Lines 113-119 Link Here
113
            return (getTagFile(token, jspSup) != null);
113
            return (getTagFile(token, jspSup) != null);
114
            
114
            
115
        } catch (BadLocationException e) {
115
        } catch (BadLocationException e) {
116
            ErrorManager.getDefault().notify(e);
116
            ErrorManager.getDefault().dangerousNotify(e);
117
            return false;
117
            return false;
118
        }
118
        }
119
    }
119
    }
Lines 167-173 Link Here
167
            }
167
            }
168
        }
168
        }
169
        catch (BadLocationException e) {
169
        catch (BadLocationException e) {
170
            ErrorManager.getDefault().notify(e);
170
            ErrorManager.getDefault().dangerousNotify(e);
171
            return null;
171
            return null;
172
        }
172
        }
173
    }
173
    }
Lines 220-226 Link Here
220
            }
220
            }
221
        }
221
        }
222
        catch (BadLocationException e) {
222
        catch (BadLocationException e) {
223
            ErrorManager.getDefault().notify(e);
223
            ErrorManager.getDefault().dangerousNotify(e);
224
        }
224
        }
225
    }
225
    }
226
226
Lines 286-292 Link Here
286
                dobj = DataObject.find(fObj);
286
                dobj = DataObject.find(fObj);
287
            }
287
            }
288
            catch (DataObjectNotFoundException e){
288
            catch (DataObjectNotFoundException e){
289
               ErrorManager.getDefault().notify(e);
289
               ErrorManager.getDefault().dangerousNotify(e);
290
               return; 
290
               return; 
291
            }
291
            }
292
            if (dobj != null){
292
            if (dobj != null){
(-)web/jspsyntax/src/org/netbeans/modules/web/core/syntax/folding/JspFoldManager.java (-4 / +4 lines)
Lines 535-541 Link Here
535
                            }catch(BadLocationException ble) {
535
                            }catch(BadLocationException ble) {
536
                                //when the document is closing the hierarchy returns different empty document, grrrr
536
                                //when the document is closing the hierarchy returns different empty document, grrrr
537
                                Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
537
                                Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
538
                                if(fhDoc.getLength() > 0) ErrorManager.getDefault().notify(ble);
538
                                if(fhDoc.getLength() > 0) ErrorManager.getDefault().dangerousNotify(ble);
539
                            }finally {
539
                            }finally {
540
                                fhTran.commit();
540
                                fhTran.commit();
541
                            }
541
                            }
Lines 555-571 Link Here
555
            //the BLE can be throws from some editor utility classes
555
            //the BLE can be throws from some editor utility classes
556
            //so we can swallow it in this case
556
            //so we can swallow it in this case
557
            Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
557
            Document fhDoc = getOperation().getHierarchy().getComponent().getDocument();
558
            if(fhDoc.getLength() > 0) ErrorManager.getDefault().notify(e);
558
            if(fhDoc.getLength() > 0) ErrorManager.getDefault().dangerousNotify(e);
559
        }catch(InterruptedException ie) {
559
        }catch(InterruptedException ie) {
560
            //do nothing
560
            //do nothing
561
        }catch(InvocationTargetException ite) {
561
        }catch(InvocationTargetException ite) {
562
            ErrorManager.getDefault().notify(ite);
562
            ErrorManager.getDefault().dangerousNotify(ite);
563
        }catch(ParsingCancelledException pce) {
563
        }catch(ParsingCancelledException pce) {
564
            throw new ParsingCancelledException();
564
            throw new ParsingCancelledException();
565
        }catch(Exception e) {
565
        }catch(Exception e) {
566
            //do not let exceptions like NPEs to fall through to the timer's task run method.
566
            //do not let exceptions like NPEs to fall through to the timer's task run method.
567
            //if this happens the timer is cancelled and cannot be used anymore
567
            //if this happens the timer is cancelled and cannot be used anymore
568
            ErrorManager.getDefault().notify(e);
568
            ErrorManager.getDefault().dangerousNotify(e);
569
        } finally {
569
        } finally {
570
            if(debug) JspFoldUtils.printFolds(getOperation()); //DEBUG - print folds structure into console
570
            if(debug) JspFoldUtils.printFolds(getOperation()); //DEBUG - print folds structure into console
571
        }
571
        }
(-)web/project/src/org/netbeans/modules/web/project/SourceRoots.java (-1 / +1 lines)
Lines 187-193 Link Here
187
                                try {
187
                                try {
188
                                    result.add(WebProjectUtil.getRootURL(f,null));
188
                                    result.add(WebProjectUtil.getRootURL(f,null));
189
                                } catch (MalformedURLException e) {
189
                                } catch (MalformedURLException e) {
190
                                    ErrorManager.getDefault().notify(e);
190
                                    ErrorManager.getDefault().dangerousNotify(e);
191
                                }
191
                                }
192
                            }
192
                            }
193
                        }
193
                        }
(-)web/project/src/org/netbeans/modules/web/project/UpdateHelper.java (-2 / +2 lines)
Lines 132-138 Link Here
132
                            saveUpdate (props);
132
                            saveUpdate (props);
133
                            helper.putProperties(path,props);
133
                            helper.putProperties(path,props);
134
                        } catch (IOException ioe) {
134
                        } catch (IOException ioe) {
135
                            ErrorManager.getDefault().notify (ioe);
135
                            ErrorManager.getDefault().dangerousNotify (ioe);
136
                        }
136
                        }
137
                    }
137
                    }
138
                }
138
                }
Lines 179-185 Link Here
179
                        saveUpdate (null);
179
                        saveUpdate (null);
180
                        helper.putPrimaryConfigurationData(element, shared);
180
                        helper.putPrimaryConfigurationData(element, shared);
181
                    } catch (IOException ioe) {
181
                    } catch (IOException ioe) {
182
                        ErrorManager.getDefault().notify(ioe);
182
                        ErrorManager.getDefault().dangerousNotify(ioe);
183
                    }
183
                    }
184
                }
184
                }
185
            }
185
            }
(-)web/project/src/org/netbeans/modules/web/project/WebActionProvider.java (-1 / +1 lines)
Lines 204-210 Link Here
204
  	            }                    
204
  	            }                    
205
                } 
205
                } 
206
                catch (IOException e) {
206
                catch (IOException e) {
207
                    ErrorManager.getDefault().notify(e);
207
                    ErrorManager.getDefault().dangerousNotify(e);
208
                }
208
                }
209
            }            
209
            }            
210
        };
210
        };
(-)web/project/src/org/netbeans/modules/web/project/WebContainerImpl.java (-1 / +1 lines)
Lines 117-123 Link Here
117
                artifactItems[0] = new AntArtifactChooser.ArtifactItem (target, target.getArtifactLocation());
117
                artifactItems[0] = new AntArtifactChooser.ArtifactItem (target, target.getArtifactLocation());
118
                cpExtender.addAntArtifacts(WebProjectProperties.JAVAC_CLASSPATH, artifactItems, WebProjectProperties.TAG_WEB_MODULE_LIBRARIES);
118
                cpExtender.addAntArtifacts(WebProjectProperties.JAVAC_CLASSPATH, artifactItems, WebProjectProperties.TAG_WEB_MODULE_LIBRARIES);
119
            } catch (IOException ioe) {
119
            } catch (IOException ioe) {
120
                ErrorManager.getDefault().notify(ioe);
120
                ErrorManager.getDefault().dangerousNotify(ioe);
121
            }
121
            }
122
        }
122
        }
123
        else {
123
        else {
(-)web/project/src/org/netbeans/modules/web/project/WebProject.java (-6 / +6 lines)
Lines 421-427 Link Here
421
                classPathExtender.addArchiveFile(fo);
421
                classPathExtender.addArchiveFile(fo);
422
            }
422
            }
423
            catch (IOException e) {
423
            catch (IOException e) {
424
                ErrorManager.getDefault().notify(e);
424
                ErrorManager.getDefault().dangerousNotify(e);
425
            }
425
            }
426
        }
426
        }
427
    }
427
    }
Lines 492-498 Link Here
492
                            try {
492
                            try {
493
                                ProjectManager.getDefault().saveProject(WebProject.this);
493
                                ProjectManager.getDefault().saveProject(WebProject.this);
494
                            } catch (IOException e) {
494
                            } catch (IOException e) {
495
                                ErrorManager.getDefault().notify(e);
495
                                ErrorManager.getDefault().dangerousNotify(e);
496
                            }
496
                            }
497
                            return null;
497
                            return null;
498
                        }
498
                        }
Lines 586-594 Link Here
586
                                    GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
586
                                    GeneratedFilesHelper.BUILD_IMPL_XML_PATH,
587
                                    WebProject.class.getResource("resources/build-impl.xsl"));
587
                                    WebProject.class.getResource("resources/build-impl.xsl"));
588
                            } catch (IOException e) {
588
                            } catch (IOException e) {
589
                                ErrorManager.getDefault().notify(e);
589
                                ErrorManager.getDefault().dangerousNotify(e);
590
                            } catch (IllegalStateException e) {
590
                            } catch (IllegalStateException e) {
591
                                ErrorManager.getDefault().notify(e);
591
                                ErrorManager.getDefault().dangerousNotify(e);
592
                            }
592
                            }
593
                        }
593
                        }
594
                    }
594
                    }
Lines 633-639 Link Here
633
                    try {
633
                    try {
634
                        ProjectManager.getDefault().saveProject(WebProject.this);
634
                        ProjectManager.getDefault().saveProject(WebProject.this);
635
                    } catch (IOException e) {
635
                    } catch (IOException e) {
636
                        ErrorManager.getDefault().notify(e);
636
                        ErrorManager.getDefault().dangerousNotify(e);
637
                    }
637
                    }
638
                    return null;
638
                    return null;
639
                }
639
                }
Lines 770-776 Link Here
770
            try {
770
            try {
771
                ProjectManager.getDefault().saveProject(WebProject.this);
771
                ProjectManager.getDefault().saveProject(WebProject.this);
772
            } catch (IOException e) {
772
            } catch (IOException e) {
773
                ErrorManager.getDefault().notify(e);
773
                ErrorManager.getDefault().dangerousNotify(e);
774
            }
774
            }
775
            
775
            
776
            // Unregister copy on save support
776
            // Unregister copy on save support
(-)web/project/src/org/netbeans/modules/web/project/WebProjectModule.java (-1 / +1 lines)
Lines 95-101 Link Here
95
                                PropertyUtils.putGlobalProperties (ep);
95
                                PropertyUtils.putGlobalProperties (ep);
96
                            }
96
                            }
97
                        } catch (IOException ioe) {
97
                        } catch (IOException ioe) {
98
                            ErrorManager.getDefault().notify (ioe);
98
                            ErrorManager.getDefault().dangerousNotify (ioe);
99
                        }
99
                        }
100
                    }
100
                    }
101
                }
101
                }
(-)web/project/src/org/netbeans/modules/web/project/api/WebProjectUtilities.java (-2 / +2 lines)
Lines 285-291 Link Here
285
            }
285
            }
286
        });
286
        });
287
        } catch (MutexException me ) {
287
        } catch (MutexException me ) {
288
            ErrorManager.getDefault().notify (me);
288
            ErrorManager.getDefault().dangerousNotify (me);
289
        }
289
        }
290
290
291
        if (libFolder != null) {
291
        if (libFolder != null) {
Lines 497-503 Link Here
497
                    ProjectManager.getDefault().saveProject(ProjectManager.getDefault().findProject(helper.getProjectDirectory()));
497
                    ProjectManager.getDefault().saveProject(ProjectManager.getDefault().findProject(helper.getProjectDirectory()));
498
                }
498
                }
499
                catch (IOException e) {
499
                catch (IOException e) {
500
                    ErrorManager.getDefault().notify(e);
500
                    ErrorManager.getDefault().dangerousNotify(e);
501
                }
501
                }
502
            }
502
            }
503
        });
503
        });
(-)web/project/src/org/netbeans/modules/web/project/classpath/JspSourcePathImplementation.java (-1 / +1 lines)
Lines 74-80 Link Here
74
                try {
74
                try {
75
                    webDocbaseDirRes = ClassPathSupport.createResource(webDocbaseDirFO.getURL());
75
                    webDocbaseDirRes = ClassPathSupport.createResource(webDocbaseDirFO.getURL());
76
                } catch (FileStateInvalidException e) {
76
                } catch (FileStateInvalidException e) {
77
                    ErrorManager.getDefault().notify(e);
77
                    ErrorManager.getDefault().dangerousNotify(e);
78
                }
78
                }
79
            }
79
            }
80
        }
80
        }
(-)web/project/src/org/netbeans/modules/web/project/classpath/SourcePathImplementation.java (-1 / +1 lines)
Lines 91-97 Link Here
91
                            result.add(ClassPathSupport.createResource(url));
91
                            result.add(ClassPathSupport.createResource(url));
92
                        }
92
                        }
93
                    } catch (MalformedURLException ex) {
93
                    } catch (MalformedURLException ex) {
94
                        ErrorManager.getDefault ().notify (ex);
94
                        ErrorManager.getDefault ().dangerousNotify (ex);
95
                    }
95
                    }
96
                }
96
                }
97
                this.resources = Collections.unmodifiableList(result);
97
                this.resources = Collections.unmodifiableList(result);
(-)web/project/src/org/netbeans/modules/web/project/classpath/WebProjectClassPathExtender.java (-1 / +1 lines)
Lines 272-278 Link Here
272
                    ProjectManager.getDefault().saveProject(project);
272
                    ProjectManager.getDefault().saveProject(project);
273
                }
273
                }
274
                catch (IOException e) {
274
                catch (IOException e) {
275
                    ErrorManager.getDefault().notify(e);
275
                    ErrorManager.getDefault().dangerousNotify(e);
276
                }
276
                }
277
            }
277
            }
278
        });
278
        });
(-)web/project/src/org/netbeans/modules/web/project/queries/CompiledSourceForBinaryQuery.java (-1 / +1 lines)
Lines 103-109 Link Here
103
                }
103
                }
104
            }
104
            }
105
        } catch (MalformedURLException malformedURL) {
105
        } catch (MalformedURLException malformedURL) {
106
            ErrorManager.getDefault().notify(malformedURL);
106
            ErrorManager.getDefault().dangerousNotify(malformedURL);
107
        }
107
        }
108
        return false;
108
        return false;
109
    }
109
    }
(-)web/project/src/org/netbeans/modules/web/project/queries/JavadocForBinaryQueryImpl.java (-2 / +2 lines)
Lines 69-75 Link Here
69
                            this.result = new URL[] {url};
69
                            this.result = new URL[] {url};
70
                        } catch (MalformedURLException e) {
70
                        } catch (MalformedURLException e) {
71
                            this.result = new URL[0];
71
                            this.result = new URL[0];
72
                            ErrorManager.getDefault().notify(e);
72
                            ErrorManager.getDefault().dangerousNotify(e);
73
                        }
73
                        }
74
                    }
74
                    }
75
                    else {
75
                    else {
Lines 140-146 Link Here
140
                        binaryRoot.toExternalForm().startsWith(url.toExternalForm());
140
                        binaryRoot.toExternalForm().startsWith(url.toExternalForm());
141
            }
141
            }
142
        } catch (MalformedURLException malformedURL) {
142
        } catch (MalformedURLException malformedURL) {
143
            ErrorManager.getDefault().notify(malformedURL);
143
            ErrorManager.getDefault().dangerousNotify(malformedURL);
144
        }
144
        }
145
        return false;
145
        return false;
146
    }
146
    }
(-)web/project/src/org/netbeans/modules/web/project/ui/ActionFilterNode.java (-1 / +1 lines)
Lines 226-232 Link Here
226
                }
226
                }
227
                ShowJavadocAction.showJavaDoc(pageURL,relativeName.replace('/','.'));  //NOI18N
227
                ShowJavadocAction.showJavaDoc(pageURL,relativeName.replace('/','.'));  //NOI18N
228
            } catch (FileStateInvalidException fsi) {
228
            } catch (FileStateInvalidException fsi) {
229
                ErrorManager.getDefault().notify (fsi);
229
                ErrorManager.getDefault().dangerousNotify (fsi);
230
            }
230
            }
231
        }
231
        }
232
    }
232
    }
(-)web/project/src/org/netbeans/modules/web/project/ui/LibrariesNode.java (-5 / +5 lines)
Lines 433-439 Link Here
433
                    return new LibrariesSourceGroup (root,displayName,icon,openedIcon);
433
                    return new LibrariesSourceGroup (root,displayName,icon,openedIcon);
434
                }
434
                }
435
            } catch (MalformedURLException e) {
435
            } catch (MalformedURLException e) {
436
                ErrorManager.getDefault().notify(e);
436
                ErrorManager.getDefault().dangerousNotify(e);
437
            }
437
            }
438
            return null;
438
            return null;
439
        }        
439
        }        
Lines 564-570 Link Here
564
                try {
564
                try {
565
                    cpExtender.addAntArtifacts(classPathId, artifactItems, webModuleElementName);
565
                    cpExtender.addAntArtifacts(classPathId, artifactItems, webModuleElementName);
566
                } catch (IOException ioe) {
566
                } catch (IOException ioe) {
567
                    ErrorManager.getDefault().notify(ioe);
567
                    ErrorManager.getDefault().dangerousNotify(ioe);
568
                }
568
                }
569
            }
569
            }
570
            else {
570
            else {
Lines 612-618 Link Here
612
                try {
612
                try {
613
                    cpExtender.addLibraries(classPathId, libraries, webModuleElementName);
613
                    cpExtender.addLibraries(classPathId, libraries, webModuleElementName);
614
                } catch (IOException ioe) {
614
                } catch (IOException ioe) {
615
                    ErrorManager.getDefault().notify(ioe);
615
                    ErrorManager.getDefault().dangerousNotify(ioe);
616
                }
616
                }
617
            }
617
            }
618
            else {
618
            else {
Lines 684-690 Link Here
684
                    fileObjects.toArray(fileObjectArray);
684
                    fileObjects.toArray(fileObjectArray);
685
                    cpExtender.addArchiveFiles(classPathId, fileObjectArray, webModuleElementName);                    
685
                    cpExtender.addArchiveFiles(classPathId, fileObjectArray, webModuleElementName);                    
686
                } catch (IOException ioe) {
686
                } catch (IOException ioe) {
687
                    ErrorManager.getDefault().notify(ioe);
687
                    ErrorManager.getDefault().dangerousNotify(ioe);
688
                }
688
                }
689
            }
689
            }
690
            else {
690
            else {
Lines 711-717 Link Here
711
            try {
711
            try {
712
                return FileUtil.isArchiveFile(f.toURI().toURL());
712
                return FileUtil.isArchiveFile(f.toURI().toURL());
713
            } catch (MalformedURLException mue) {
713
            } catch (MalformedURLException mue) {
714
                ErrorManager.getDefault().notify(mue);
714
                ErrorManager.getDefault().dangerousNotify(mue);
715
                return false;
715
                return false;
716
            }
716
            }
717
        }
717
        }
(-)web/project/src/org/netbeans/modules/web/project/ui/LibrariesSourceGroup.java (-1 / +1 lines)
Lines 68-74 Link Here
68
        try {        
68
        try {        
69
            return root.getURL().toExternalForm();
69
            return root.getURL().toExternalForm();
70
        } catch (FileStateInvalidException fsi) { 
70
        } catch (FileStateInvalidException fsi) { 
71
            ErrorManager.getDefault().notify (fsi);
71
            ErrorManager.getDefault().dangerousNotify (fsi);
72
            return root.toString();
72
            return root.toString();
73
        }
73
        }
74
    }
74
    }
(-)web/project/src/org/netbeans/modules/web/project/ui/PlatformNode.java (-1 / +1 lines)
Lines 193-199 Link Here
193
                        result.add (new LibrariesSourceGroup(roots[i],file.getNameExt(),icon, openedIcon));
193
                        result.add (new LibrariesSourceGroup(roots[i],file.getNameExt(),icon, openedIcon));
194
                    }
194
                    }
195
                } catch (FileStateInvalidException e) {
195
                } catch (FileStateInvalidException e) {
196
                    ErrorManager.getDefault().notify(e);
196
                    ErrorManager.getDefault().dangerousNotify(e);
197
                }
197
                }
198
            }
198
            }
199
            return result;
199
            return result;
(-)web/project/src/org/netbeans/modules/web/project/ui/ProjectNode.java (-1 / +1 lines)
Lines 205-211 Link Here
205
                }
205
                }
206
                urls.addAll(Arrays.asList(JavadocForBinaryQuery.findJavadoc(artifactURL).getRoots()));                
206
                urls.addAll(Arrays.asList(JavadocForBinaryQuery.findJavadoc(artifactURL).getRoots()));                
207
            } catch (MalformedURLException mue) {
207
            } catch (MalformedURLException mue) {
208
                ErrorManager.getDefault().notify (mue);                
208
                ErrorManager.getDefault().dangerousNotify (mue);                
209
            }                                    
209
            }                                    
210
            return urls;
210
            return urls;
211
        }
211
        }
(-)web/project/src/org/netbeans/modules/web/project/ui/RemoveClassPathRootAction.java (-1 / +1 lines)
Lines 87-93 Link Here
87
                        ProjectManager.getDefault().saveProject(p);
87
                        ProjectManager.getDefault().saveProject(p);
88
                    }
88
                    }
89
                    catch (IOException e) {
89
                    catch (IOException e) {
90
                        ErrorManager.getDefault().notify(e);
90
                        ErrorManager.getDefault().dangerousNotify(e);
91
                    }
91
                    }
92
                }
92
                }
93
            }
93
            }
(-)web/project/src/org/netbeans/modules/web/project/ui/WebPhysicalViewProvider.java (-2 / +2 lines)
Lines 517-523 Link Here
517
                }
517
                }
518
            } catch (DataObjectNotFoundException ex) {
518
            } catch (DataObjectNotFoundException ex) {
519
                // data folder for exitinf fileobject expected
519
                // data folder for exitinf fileobject expected
520
                ErrorManager.getDefault().notify(ex);
520
                ErrorManager.getDefault().dangerousNotify(ex);
521
            }
521
            }
522
            
522
            
523
            actions.add(null);
523
            actions.add(null);
Lines 559-565 Link Here
559
                    BrokenReferencesSupport.showCustomizer(helper.getAntProjectHelper(), resolver, getBreakableProperties(), new String[]{WebProjectProperties.JAVA_PLATFORM});
559
                    BrokenReferencesSupport.showCustomizer(helper.getAntProjectHelper(), resolver, getBreakableProperties(), new String[]{WebProjectProperties.JAVA_PLATFORM});
560
                    run();
560
                    run();
561
                } catch (IOException ioe) {
561
                } catch (IOException ioe) {
562
                    ErrorManager.getDefault().notify (ioe);
562
                    ErrorManager.getDefault().dangerousNotify (ioe);
563
                }
563
                }
564
            }
564
            }
565
565
(-)web/project/src/org/netbeans/modules/web/project/ui/customizer/WebProjectProperties.java (-3 / +3 lines)
Lines 364-373 Link Here
364
            }
364
            }
365
        } 
365
        } 
366
        catch (MutexException e) {
366
        catch (MutexException e) {
367
            ErrorManager.getDefault().notify((IOException)e.getException());
367
            ErrorManager.getDefault().dangerousNotify((IOException)e.getException());
368
        }
368
        }
369
        catch ( IOException ex ) {
369
        catch ( IOException ex ) {
370
            ErrorManager.getDefault().notify( ex );
370
            ErrorManager.getDefault().dangerousNotify( ex );
371
        }
371
        }
372
    }
372
    }
373
373
Lines 702-708 Link Here
702
                    ProjectManager.getDefault().saveProject(project);
702
                    ProjectManager.getDefault().saveProject(project);
703
                }
703
                }
704
                catch (IOException e) {
704
                catch (IOException e) {
705
                    ErrorManager.getDefault().notify(e);
705
                    ErrorManager.getDefault().dangerousNotify(e);
706
                }
706
                }
707
            }
707
            }
708
        });
708
        });
(-)web/project/src/org/netbeans/modules/web/project/ui/wizards/PanelSourceFolders.java (-1 / +1 lines)
Lines 265-271 Link Here
265
                        fo.delete ();
265
                        fo.delete ();
266
                    }
266
                    }
267
                } catch (IOException ioe) {
267
                } catch (IOException ioe) {
268
                    ErrorManager.getDefault ().notify (ioe);
268
                    ErrorManager.getDefault ().dangerousNotify (ioe);
269
                }
269
                }
270
            }
270
            }
271
        }
271
        }
(-)web/struts/src/org/netbeans/modules/web/struts/StrutsConfigEditorSupport.java (-1 / +1 lines)
Lines 165-171 Link Here
165
                    getDataObject().setModified (false);
165
                    getDataObject().setModified (false);
166
166
167
                } catch (BadLocationException lex) {
167
                } catch (BadLocationException lex) {
168
                    org.openide.ErrorManager.getDefault().notify(lex);
168
                    org.openide.ErrorManager.getDefault().dangerousNotify(lex);
169
                }
169
                }
170
170
171
            } else { // NotifyDescriptor != YES_OPTION
171
            } else { // NotifyDescriptor != YES_OPTION
(-)web/struts/src/org/netbeans/modules/web/struts/StrutsConfigLoaderBeanInfo.java (-1 / +1 lines)
Lines 29-35 Link Here
29
        try {
29
        try {
30
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
30
            return new BeanInfo[] { Introspector.getBeanInfo(UniFileLoader.class) };
31
        } catch (IntrospectionException ie) {
31
        } catch (IntrospectionException ie) {
32
            ErrorManager.getDefault().notify(ie);
32
            ErrorManager.getDefault().dangerousNotify(ie);
33
            return null;
33
            return null;
34
        }
34
        }
35
    }
35
    }
(-)web/struts/src/org/netbeans/modules/web/struts/StrutsFrameworkProvider.java (-4 / +4 lines)
Lines 94-100 Link Here
94
                try {
94
                try {
95
                    cpExtender.addLibrary(lib);
95
                    cpExtender.addLibrary(lib);
96
                } catch (IOException ioe) {
96
                } catch (IOException ioe) {
97
                    ErrorManager.getDefault().notify(ioe);
97
                    ErrorManager.getDefault().dangerousNotify(ioe);
98
98
99
                }
99
                }
100
            } else {
100
            } else {
Lines 106-115 Link Here
106
                fs.runAtomicAction(new CreateStrutsConfig(wm));
106
                fs.runAtomicAction(new CreateStrutsConfig(wm));
107
              
107
              
108
            } catch (FileNotFoundException exc) {
108
            } catch (FileNotFoundException exc) {
109
                ErrorManager.getDefault().notify(exc);
109
                ErrorManager.getDefault().dangerousNotify(exc);
110
                return null;
110
                return null;
111
            } catch (IOException exc) {
111
            } catch (IOException exc) {
112
                ErrorManager.getDefault().notify(exc);
112
                ErrorManager.getDefault().dangerousNotify(exc);
113
                return null;
113
                return null;
114
            }
114
            }
115
        }
115
        }
Lines 331-337 Link Here
331
                    
331
                    
332
                }
332
                }
333
                catch (ClassNotFoundException cnfe){
333
                catch (ClassNotFoundException cnfe){
334
                    ErrorManager.getDefault().notify(cnfe);
334
                    ErrorManager.getDefault().dangerousNotify(cnfe);
335
                }
335
                }
336
            }
336
            }
337
            
337
            
(-)web/struts/src/org/netbeans/modules/web/struts/editor/StrutsConfigHyperlinkProvider.java (-1 / +1 lines)
Lines 368-374 Link Here
368
                dobj = DataObject.find(fObj);
368
                dobj = DataObject.find(fObj);
369
            }
369
            }
370
            catch (DataObjectNotFoundException e){
370
            catch (DataObjectNotFoundException e){
371
               ErrorManager.getDefault().notify(e);
371
               ErrorManager.getDefault().dangerousNotify(e);
372
               return; 
372
               return; 
373
            }
373
            }
374
            if (dobj != null){
374
            if (dobj != null){
(-)web/struts/src/org/netbeans/modules/web/struts/editor/StrutsEditorUtilities.java (-4 / +4 lines)
Lines 87-93 Link Here
87
            }   
87
            }   
88
            return null;
88
            return null;
89
        } catch (BadLocationException e) {
89
        } catch (BadLocationException e) {
90
            ErrorManager.getDefault().notify(e);
90
            ErrorManager.getDefault().dangerousNotify(e);
91
        }
91
        }
92
        return null;
92
        return null;
93
    }
93
    }
Lines 135-141 Link Here
135
            }   
135
            }   
136
            return null;
136
            return null;
137
        } catch (BadLocationException e) {
137
        } catch (BadLocationException e) {
138
            ErrorManager.getDefault().notify(e);
138
            ErrorManager.getDefault().dangerousNotify(e);
139
        }
139
        }
140
        return null;
140
        return null;
141
    }
141
    }
Lines 238-244 Link Here
238
            }
238
            }
239
                
239
                
240
        } catch (BadLocationException ex) {
240
        } catch (BadLocationException ex) {
241
            ErrorManager.getDefault().notify(ex);
241
            ErrorManager.getDefault().dangerousNotify(ex);
242
        }
242
        }
243
        return possition;
243
        return possition;
244
    }
244
    }
Lines 320-326 Link Here
320
                }
320
                }
321
            }
321
            }
322
        } catch (BadLocationException ex) {
322
        } catch (BadLocationException ex) {
323
            ErrorManager.getDefault().notify(ex);
323
            ErrorManager.getDefault().dangerousNotify(ex);
324
        }        
324
        }        
325
        return possition;
325
        return possition;
326
    }
326
    }
(-)web/struts/src/org/netbeans/modules/web/struts/editor/StrutsPopupAction.java (-2 / +2 lines)
Lines 132-138 Link Here
132
                    //((StrutsConfigDataObject)data).write(config);
132
                    //((StrutsConfigDataObject)data).write(config);
133
                    target.setCaretPosition(StrutsEditorUtilities.writeBean((BaseDocument)doc, bean, "form-bean", "form-beans"));       //NOI18N
133
                    target.setCaretPosition(StrutsEditorUtilities.writeBean((BaseDocument)doc, bean, "form-bean", "form-beans"));       //NOI18N
134
                } catch (java.io.IOException ex) {
134
                } catch (java.io.IOException ex) {
135
                    ErrorManager.getDefault().notify(ex);
135
                    ErrorManager.getDefault().dangerousNotify(ex);
136
                }
136
                }
137
            }
137
            }
138
            
138
            
Lines 330-336 Link Here
330
                    
330
                    
331
                }
331
                }
332
            } catch (java.io.IOException ex) {
332
            } catch (java.io.IOException ex) {
333
                ErrorManager.getDefault().notify(ex);
333
                ErrorManager.getDefault().dangerousNotify(ex);
334
            }
334
            }
335
        }
335
        }
336
    }
336
    }
(-)xml/catalog/src/org/netbeans/modules/xml/catalog/CatalogEntryNode.java (-1 / +1 lines)
Lines 87-93 Link Here
87
                            Util.THIS.getString("MSG_CannotOpenURI",getSystemID()), //NOI18N
87
                            Util.THIS.getString("MSG_CannotOpenURI",getSystemID()), //NOI18N
88
                            NotifyDescriptor.INFORMATION_MESSAGE));
88
                            NotifyDescriptor.INFORMATION_MESSAGE));
89
        } catch (Throwable ex) {
89
        } catch (Throwable ex) {
90
            ErrorManager.getDefault().notify(ex);
90
            ErrorManager.getDefault().dangerousNotify(ex);
91
        }
91
        }
92
    }
92
    }
93
    
93
    
(-)xml/catalog/src/org/netbeans/modules/xml/catalog/user/UserXMLCatalog.java (-4 / +4 lines)
Lines 143-152 Link Here
143
                publicIds = parse(userCatalog);
143
                publicIds = parse(userCatalog);
144
            } catch (java.io.IOException ex) {
144
            } catch (java.io.IOException ex) {
145
                publicIds = new HashMap();
145
                publicIds = new HashMap();
146
                org.openide.ErrorManager.getDefault().notify(ex);
146
                org.openide.ErrorManager.getDefault().dangerousNotify(ex);
147
            } catch (SAXException ex) {
147
            } catch (SAXException ex) {
148
                publicIds = new HashMap();
148
                publicIds = new HashMap();
149
                org.openide.ErrorManager.getDefault().notify(ex);
149
                org.openide.ErrorManager.getDefault().dangerousNotify(ex);
150
            }
150
            }
151
        } 
151
        } 
152
        return publicIds;
152
        return publicIds;
Lines 321-327 Link Here
321
            reader.parse(new InputSource(userCatalog.getInputStream()));
321
            reader.parse(new InputSource(userCatalog.getInputStream()));
322
            return handler.getValues();
322
            return handler.getValues();
323
        } catch(javax.xml.parsers.ParserConfigurationException ex) {
323
        } catch(javax.xml.parsers.ParserConfigurationException ex) {
324
            org.openide.ErrorManager.getDefault().notify(ex);
324
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
325
            return new java.util.HashMap();
325
            return new java.util.HashMap();
326
        }
326
        }
327
    }
327
    }
Lines 359-365 Link Here
359
                      removeEntry(TYPE_URI, key.substring(URI_PREFIX.length()));
359
                      removeEntry(TYPE_URI, key.substring(URI_PREFIX.length()));
360
            }
360
            }
361
        } catch (IOException ex) {
361
        } catch (IOException ex) {
362
            org.openide.ErrorManager.getDefault().notify(ex);
362
            org.openide.ErrorManager.getDefault().dangerousNotify(ex);
363
        }
363
        }
364
    }
364
    }
365
    
365
    
(-)xml/multiview/src/org/netbeans/modules/xml/multiview/Utils.java (-2 / +2 lines)
Lines 92-98 Link Here
92
                        }
92
                        }
93
                    }
93
                    }
94
                } catch (BadLocationException e) {
94
                } catch (BadLocationException e) {
95
                    ErrorManager.getDefault().notify(e);
95
                    ErrorManager.getDefault().dangerousNotify(e);
96
                }
96
                }
97
            }
97
            }
98
        };
98
        };
Lines 182-188 Link Here
182
            try {
182
            try {
183
                task.waitFinished(WAIT_FINISHED_TIMEOUT);
183
                task.waitFinished(WAIT_FINISHED_TIMEOUT);
184
            } catch (InterruptedException e) {
184
            } catch (InterruptedException e) {
185
                ErrorManager.getDefault().notify(e);
185
                ErrorManager.getDefault().dangerousNotify(e);
186
            }
186
            }
187
        }
187
        }
188
    }
188
    }
(-)xml/multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewDataObject.java (-2 / +2 lines)
Lines 190-196 Link Here
190
        try {
190
        try {
191
            lock = waitForLock();
191
            lock = waitForLock();
192
        } catch (IOException e) {
192
        } catch (IOException e) {
193
            ErrorManager.getDefault().notify(e);
193
            ErrorManager.getDefault().dangerousNotify(e);
194
            return !isModified();
194
            return !isModified();
195
        }
195
        }
196
        try {
196
        try {
Lines 399-405 Link Here
399
                    editorSupport.saveDocument(dataLock);
399
                    editorSupport.saveDocument(dataLock);
400
                }
400
                }
401
            } catch (IOException e) {
401
            } catch (IOException e) {
402
                ErrorManager.getDefault().notify(e);
402
                ErrorManager.getDefault().dangerousNotify(e);
403
            }
403
            }
404
        }
404
        }
405
405
(-)xml/multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewDataSynchronizer.java (-1 / +1 lines)
Lines 132-138 Link Here
132
                    try {
132
                    try {
133
                        updateLock = takeLock();
133
                        updateLock = takeLock();
134
                    } catch (IOException e) {
134
                    } catch (IOException e) {
135
                        ErrorManager.getDefault().notify(e);
135
                        ErrorManager.getDefault().dangerousNotify(e);
136
                        return;
136
                        return;
137
                    }
137
                    }
138
                }
138
                }
(-)xml/multiview/src/org/netbeans/modules/xml/multiview/XmlMultiViewEditorSupport.java (-4 / +4 lines)
Lines 157-163 Link Here
157
            dObj.getDataCache().loadData(dObj.getPrimaryFile(), reloadLock);
157
            dObj.getDataCache().loadData(dObj.getPrimaryFile(), reloadLock);
158
        } catch (IOException e) {
158
        } catch (IOException e) {
159
            reloadLock = null;
159
            reloadLock = null;
160
            ErrorManager.getDefault().notify(e);
160
            ErrorManager.getDefault().dangerousNotify(e);
161
        }
161
        }
162
        final Task reloadDocumentTask = XmlMultiViewEditorSupport.super.reloadDocument();
162
        final Task reloadDocumentTask = XmlMultiViewEditorSupport.super.reloadDocument();
163
        final FileLock lock = reloadLock;
163
        final FileLock lock = reloadLock;
Lines 504-510 Link Here
504
                try {
504
                try {
505
                    dObj.getDataCache().setData(lock, "", modify); // NOI18N
505
                    dObj.getDataCache().setData(lock, "", modify); // NOI18N
506
                } catch (IOException e) {
506
                } catch (IOException e) {
507
                    ErrorManager.getDefault().notify(e);
507
                    ErrorManager.getDefault().dangerousNotify(e);
508
                }
508
                }
509
            } else {
509
            } else {
510
                // safely take the text from the document
510
                // safely take the text from the document
Lines 515-521 Link Here
515
                        } catch (BadLocationException e) {
515
                        } catch (BadLocationException e) {
516
                            // impossible
516
                            // impossible
517
                        } catch (IOException e) {
517
                        } catch (IOException e) {
518
                            ErrorManager.getDefault().notify(e);
518
                            ErrorManager.getDefault().dangerousNotify(e);
519
                        }
519
                        }
520
                    }
520
                    }
521
                });
521
                });
Lines 585-591 Link Here
585
                            return false;
585
                            return false;
586
                        }
586
                        }
587
                    } catch (java.io.IOException e) {
587
                    } catch (java.io.IOException e) {
588
                        org.openide.ErrorManager.getDefault().notify(e);
588
                        org.openide.ErrorManager.getDefault().dangerousNotify(e);
589
                        return false;
589
                        return false;
590
                    }
590
                    }
591
                } else if (discardOption.equals(ret)) {
591
                } else if (discardOption.equals(ret)) {
(-)xml/text-edit/src/org/netbeans/modules/xml/text/completion/XMLCompletionQuery.java (-1 / +1 lines)
Lines 283-289 Link Here
283
            Enumeration res = performer.queryElements(ctx);
283
            Enumeration res = performer.queryElements(ctx);
284
            return translateElements(res, typedPrefix, performer);
284
            return translateElements(res, typedPrefix, performer);
285
        } catch(UOException e){
285
        } catch(UOException e){
286
            ErrorManager.getDefault().notify(e);
286
            ErrorManager.getDefault().dangerousNotify(e);
287
            return null;
287
            return null;
288
        }
288
        }
289
    }
289
    }
(-)xml/text-edit/src/org/netbeans/modules/xml/text/folding/XmlFoldManager.java (-2 / +2 lines)
Lines 114-120 Link Here
114
            //the changes will be subsequently transformed to folds
114
            //the changes will be subsequently transformed to folds
115
            addElementsRecursivelly(changes, model.getRootElement());
115
            addElementsRecursivelly(changes, model.getRootElement());
116
        } catch (DocumentModelException e) {
116
        } catch (DocumentModelException e) {
117
            ErrorManager.getDefault().notify(e);
117
            ErrorManager.getDefault().dangerousNotify(e);
118
        }
118
        }
119
    }
119
    }
120
    
120
    
Lines 310-316 Link Here
310
                    }
310
                    }
311
                    
311
                    
312
                }catch(BadLocationException ble) {
312
                }catch(BadLocationException ble) {
313
                    ErrorManager.getDefault().notify(ble);
313
                    ErrorManager.getDefault().dangerousNotify(ble);
314
                }finally {
314
                }finally {
315
                    fhTran.commit();
315
                    fhTran.commit();
316
                }
316
                }
(-)xml/text-edit/src/org/netbeans/modules/xml/text/navigator/NavigatorContent.java (-1 / +1 lines)
Lines 151-157 Link Here
151
                //do not open a question dialog when the document is just loaded into the navigator
151
                //do not open a question dialog when the document is just loaded into the navigator
152
                showDocumentTooLarge();
152
                showDocumentTooLarge();
153
            }catch(IOException e) {
153
            }catch(IOException e) {
154
                ErrorManager.getDefault().notify(e);
154
                ErrorManager.getDefault().dangerousNotify(e);
155
            }
155
            }
156
        }
156
        }
157
    }
157
    }
(-)xml/text-edit/src/org/netbeans/modules/xml/text/syntax/XMLSyntaxSupport.java (-2 / +2 lines)
Lines 596-602 Link Here
596
                            if( txtBeforeSpace.equals("</") )  // NOI18N
596
                            if( txtBeforeSpace.equals("</") )  // NOI18N
597
                                retVal = COMPLETION_POPUP;
597
                                retVal = COMPLETION_POPUP;
598
                        } catch (BadLocationException e) {
598
                        } catch (BadLocationException e) {
599
                            ErrorManager.getDefault().notify(e);
599
                            ErrorManager.getDefault().dangerousNotify(e);
600
                        }
600
                        }
601
                    }
601
                    }
602
                    break;
602
                    break;
Lines 906-912 Link Here
906
                lastInsertedChar = s.charAt(0);
906
                lastInsertedChar = s.charAt(0);
907
            } catch (BadLocationException e1) {
907
            } catch (BadLocationException e1) {
908
                ErrorManager err = ErrorManager.getDefault();
908
                ErrorManager err = ErrorManager.getDefault();
909
                err.notify(e1);
909
                err.dangerousNotify(e1);
910
            }
910
            }
911
        }
911
        }
912
        
912
        
(-)xml/xsl/src/org/netbeans/modules/xsl/ui/Util.java (-3 / +3 lines)
Lines 80-86 Link Here
80
                            icons = dobj.getNodeDelegate();
80
                            icons = dobj.getNodeDelegate();
81
                        } catch (DataObjectNotFoundException e) {
81
                        } catch (DataObjectNotFoundException e) {
82
                            ErrorManager err = ErrorManager.getDefault();
82
                            ErrorManager err = ErrorManager.getDefault();
83
                            err.notify(e);
83
                            err.dangerousNotify(e);
84
                        }
84
                        }
85
                    }
85
                    }
86
                } else {
86
                } else {
Lines 88-94 Link Here
88
                        kids.add(new Node[] {new FilterNode(DataObject.find(folder).getNodeDelegate())});
88
                        kids.add(new Node[] {new FilterNode(DataObject.find(folder).getNodeDelegate())});
89
                    } catch (DataObjectNotFoundException e) {
89
                    } catch (DataObjectNotFoundException e) {
90
                        ErrorManager err = ErrorManager.getDefault();
90
                        ErrorManager err = ErrorManager.getDefault();
91
                        err.notify(e);
91
                        err.dangerousNotify(e);
92
                    }
92
                    }
93
                }
93
                }
94
            }
94
            }
Lines 197-203 Link Here
197
                            return new Node[] {new FilterNode(DataObject.find(fo).getNodeDelegate())};
197
                            return new Node[] {new FilterNode(DataObject.find(fo).getNodeDelegate())};
198
                        } catch (DataObjectNotFoundException e) {
198
                        } catch (DataObjectNotFoundException e) {
199
                            ErrorManager err = ErrorManager.getDefault();
199
                            ErrorManager err = ErrorManager.getDefault();
200
                            err.notify(e);
200
                            err.dangerousNotify(e);
201
                        }
201
                        }
202
                    }
202
                    }
203
                }
203
                }

Return to bug 35067