+1, we should catch only specific exceptions, not all of them. We will have a special exception for data errors in the future. Until then we can use InvalidArgumentException (NullPointerExceptions can also happen here, but we should not catch them since they would indicate a programming error rather than a data error).