Added missing version of overflow error handling to include a val parameter.