Revision 77056dda
Added by Andreas Kohlbecker about 5 years ago
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java | ||
---|---|---|
446 | 446 |
} |
447 | 447 |
if(cause == null){ |
448 | 448 |
// no known exception type found |
449 |
throw new PopupEditorException("Error saving popup editor", this, e); |
|
449 |
logger.error(e); |
|
450 |
PopupEditorException pee = null; |
|
451 |
try { |
|
452 |
pee = new PopupEditorException("Error saving popup editor", this, e); |
|
453 |
} catch (Throwable t) { |
|
454 |
/* IGORE errors which happen during the construction of the PopupEditorException */ |
|
455 |
} |
|
456 |
if(pee != null){ |
|
457 |
throw pee; |
|
458 |
} |
|
459 |
throw new RuntimeException(e); |
|
450 | 460 |
} |
451 | 461 |
|
452 | 462 |
} |
... | ... | |
595 | 605 |
while(parentComponent != null){ |
596 | 606 |
logger.debug("parentComponent: " + parentComponent.getClass().getSimpleName()); |
597 | 607 |
if(NestedFieldGroup.class.isAssignableFrom(parentComponent.getClass()) && AbstractField.class.isAssignableFrom(parentComponent.getClass())){ |
608 |
try { |
|
598 | 609 |
Object propId = ((NestedFieldGroup)parentComponent).getFieldGroup().getPropertyId(parentField); |
599 | 610 |
if(propId != null){ |
600 | 611 |
logger.debug("propId: " + propId.toString()); |
... | ... | |
602 | 613 |
} |
603 | 614 |
logger.debug("parentField: " + parentField.getClass().getSimpleName()); |
604 | 615 |
parentField = (Field)parentComponent; |
616 |
} catch (NullPointerException e){ |
|
617 |
String causeDetail = "NullPointerException"; |
|
618 |
if(((NestedFieldGroup)parentComponent).getFieldGroup() == null){ |
|
619 |
causeDetail = "parentComponent.getFieldGroup() is NULL, this should not happen."; |
|
620 |
} |
|
621 |
logger.error(causeDetail, e); |
|
622 |
} |
|
605 | 623 |
} else if(parentComponent == this) { |
606 | 624 |
// we reached the editor itself |
607 | 625 |
Object propId = fieldGroup.getPropertyId(parentField); |
Also available in: Unified diff
ref #8099 better logging of error conditions and more robust error handling in save()