}
// add the item to the cart; report any errors to the user
if (productId != null) {
try {
trans.addItem(productId, quantity);
} catch (CartItemModifyException e) {
Debug.logError(e, module);
pos.showDialog("dialog/error/producterror");
} catch (ItemNotFoundException e) {
pos.showDialog("dialog/error/productnotfound");