Error handling is best done with asserts which check for off-domain inputs and off-range outputs, and explode the running program if triggered.
I mean, security trumps convenience and uptime, right guys? Y'all do build your functions with domain and range in mind, right guys?