getValueOrError

return value or exception