added an output size method for convenience.
improved exception message for hunting down the error of a missing choice element.