Exception: NumericError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/quality_extensions/string/safe_numeric_conversion.rb

Overview

The following code augments standard conversion functions String#to_i and String#to_f with the error handling code so that an attempt to convert a string not suited for numeric conversion will raise NumericError exception.