throw new BTreeException("Invalid Page Type In addValue: " + ph.getStatus());
throw new BTreeException("Invalid Page Type In addValue: " + ph.getStatus() + "; " + page.getPageInfo());
		private long addValue(Txn transaction, Value value, long pointer) throws IOException, BTreeException {            if (value == null)                return -1;			int idx = searchKey(value);			switch (ph.getStatus()) {				case BRANCH :					if (idx < 0)						idx = - (idx + 1);					return getChildNode(idx).addValue(transaction, value, pointer);				case LEAF :					if (idx >= 0) {						// Value was found... Overwrite                        long oldPtr = ptrs[idx];                        if (transaction != null && isTransactional) {                            UpdateValueLoggable loggable = new UpdateValueLoggable(transaction, fileId, page.getPageNum(), idx,                                    value, pointer, oldPtr);                            writeToLog(loggable, this);                        }                        						ptrs[idx] = pointer;						saved = false;						//write();						//cache.add(this);						return oldPtr;					} else {						// Value was not found						idx = - (idx + 1);                        if (transaction != null && isTransactional) {                            InsertValueLoggable loggable =                                 new InsertValueLoggable(transaction, fileId, page.getPageNum(), idx,                                    value, pointer);                            writeToLog(loggable, this);                        }                        insertKey(value, idx);                        insertPointer(pointer, idx);						adjustDataLen(value);						//recalculateDataLen();						if (mustSplit()) {						    split(transaction);                        }					}					return -1;				default :					throw new BTreeException("Invalid Page Type In addValue: " + ph.getStatus());			}		}