Opened 13 years ago
Closed 13 years ago
#1530 closed defect (fixed)
Incorrect error handling when importing bioplate positions not present on the plate
Reported by: | Jari Häkkinen | Owned by: | Nicklas Nordborg |
---|---|---|---|
Priority: | minor | Milestone: | BASE 2.16 |
Component: | coreplugins | Version: | trunk |
Keywords: | Cc: |
Description
I tried to update plate position for samples. It turned out that I used to large number for column - up to 12 where there was only 9. The plug-in ended succesfully updating all samples but samples with columns 10, 11, 12 where simple dropped from the plate. All samples where updated. Maybe it is better to catch this error rather than ending the plug-in successfully.
Change History (4)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
I just checked the Plate.getWell()
method and it has a similar behavior in that it returns null if the coordinates are outside the range. Considering that this method has been around since BASE 2.0 I guess we need to accept that the getBioWell()
should behave the same. This also means that we need to handle the null case in the plug-in in a manner that is similar to an ItemNotFoundException
.
comment:3 Changed 13 years ago by
Owner: | changed from everyone to Nicklas Nordborg |
---|---|
Priority: | major → minor |
Status: | new → assigned |
Summary: | Updating biomaterial plate position information gives unexpected result → Incorrect error handling when importing bioplate positions not present on the plate |
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Hmmm... it seems like the
BioPlate.getBioWell()
method is returning null instead of throwing anItemNotFoundException
. The majority of the BASE API usually throws an exception in this kind of situation. I dont' know why thegetBioWell()
doesn't, but the documentation says that it return null if the well doesn't exists. I'll have to investigate why this method behaves different from the rest of BASE. In any case, we can always throw an exception in the plug-in and the error handling should already be setup for this case.As a side-note, there is code that depends on null being returned (
AutoFillPlateMapper
) and there is also code that will throw aNullPointerException
(BioPlateCreationEventHandler
). Both of these classes are new in 2.16 but thegetBioWell()
has been around for some time but not used except by the batch importers.