test explicit error raising in add method