Opened 14 years ago

Closed 14 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 by Nicklas Nordborg, 14 years ago

Hmmm... it seems like the BioPlate.getBioWell() method is returning null instead of throwing an ItemNotFoundException. The majority of the BASE API usually throws an exception in this kind of situation. I dont' know why the getBioWell() 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 a NullPointerException (BioPlateCreationEventHandler). Both of these classes are new in 2.16 but the getBioWell() has been around for some time but not used except by the batch importers.

comment:2 by Nicklas Nordborg, 14 years ago

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 by Nicklas Nordborg, 14 years ago

Owner: changed from everyone to Nicklas Nordborg
Priority: majorminor
Status: newassigned
Summary: Updating biomaterial plate position information gives unexpected resultIncorrect error handling when importing bioplate positions not present on the plate

comment:4 by Nicklas Nordborg, 14 years ago

Resolution: fixed
Status: assignedclosed

(In [5449]) Fixes #1530: Incorrect error handling when importing bioplate positions not present on the plate

Note: See TracTickets for help on using tickets.