Results for “ERROR_NUMBER”
Small, practical examples. Search by task or narrow things down below.
Provide a default for a missing value
Provide a default for a missing value in a complete Rust program using the standard library.
Rust✓ Tested
Raise and catch a domain-specific exception
Python: Give a validation failure its own exception type so callers can handle it narrowly.
Python✓ Tested
Reject a narrowing integer conversion
Reject a narrowing integer conversion in a complete Rust program using the standard library.
Rust✓ Tested
Reject an integer outside a byte’s range
Reject an integer outside a byte’s range using a complete Go program with explicit sample inputs.
Go✓ Tested
Reject infinity and NaN
C#: Double.IsFinite distinguishes usable finite numeric inputs from special values.
C#✓ Tested
Reject NaN and infinite numeric inputs
Python: Use isfinite before computations that require an ordinary finite float.
Python✓ Tested
Reject non-finite numeric input
Reject non-finite numeric input using a complete Go program with explicit sample inputs.
Go✓ Tested
Represent a hierarchy with nested lists
HTML: Place the nested list inside its parent list item to preserve the hierarchy.
HTML✓ Tested
Require numeric values on a chosen step
HTML: The step interval is measured from the minimum value when one is provided.
HTML✓ Tested
Round a decimal using an explicit midpoint rule
C#: Use decimal literals for decimal arithmetic and choose the midpoint rounding behavior.
C#✓ Tested
Round and format a decimal value
Round and format a decimal value in a complete Rust program using the standard library.
Rust✓ Tested
Round decimal amounts explicitly
Python: Build Decimal values from strings and choose a rounding rule explicitly.
Python✓ Tested