v.20.1Improvement

Add exception for illegal types in conversion functions with -OrZero postfix

Add exception for illegal types for conversion functions with -OrZero postfix. #7880 (Andrey Konyaev)
Adds an exception for illegal types in conversion functions that have the -OrZero postfix, improving error handling.

Why it matters

This feature addresses the issue of handling illegal type conversions in functions like toInt32OrZero by adding specific exceptions. This prevents unexpected crashes or incorrect results when input types are not suitable for conversion, enhancing stability and reliability.

How to use it

Users can utilize conversion functions with the -OrZero postfix (e.g., toInt32OrZero, toFloat64OrZero) as usual. The added exceptions will automatically handle illegal input types by returning zero without causing errors.