Results for “Error”
Small, practical examples. Search by task or narrow things down below.
Pair corresponding array items by position
TypeScript: Validate equal lengths before zipping when missing counterparts would be an error.
TypeScript✓ Tested
Pair corresponding collection elements
C#: Zip stops at the shorter sequence, so validate lengths separately if mismatches are an error.
C#✓ Tested
Parse a complete integer without exceptions
C++: from_chars reports both an error code and the first unconsumed character.
C++✓ Tested
Parse JSON into an object
Access a named field in a JSON document.
JSON✓ Tested
Read a stream again from its beginning
C: rewind returns a seekable stream to offset zero and clears its error and EOF indicators.
C✓ Tested
Rename a known file through filesystem
C++: filesystem::rename reports an error by exception when the operation fails.
C++✓ Tested
Validate a complete floating-point input
C: strtod exposes both the stopping position and range errors; reject nonfinite results when required.
C✓ Tested
Validate an argument at a method boundary
C#: ThrowIfNegative gives callers an explicit argument error for an invalid range.
C#✓ Tested