Function
pymath_exception
(err: pymath::Error, vm: &VirtualMachine)
Source from the content-addressed store, hash-verified
| 933 | } |
| 934 | |
| 935 | pub(crate) fn pymath_exception(err: pymath::Error, vm: &VirtualMachine) -> PyBaseExceptionRef { |
| 936 | match err { |
| 937 | pymath::Error::EDOM => vm.new_value_error("math domain error"), |
| 938 | pymath::Error::ERANGE => vm.new_overflow_error("math range error"), |
| 939 | } |
| 940 | } |
| 941 | |
| 942 | /// Format a float in Python style (ensures trailing .0 for integers). |
| 943 | fn float_repr(value: f64) -> String { |
Tested by
no test coverage detected