Results for “errors”
Small, practical examples. Search by task or narrow things down below.
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 non-finite numeric input
Reject non-finite numeric input using a complete Go program with explicit sample inputs.
Go✓ Tested
Return a descriptive validation error
Return a descriptive validation error using a complete Go program with explicit sample inputs.
Go✓ Tested
Stop collecting when parsing fails
Stop collecting when parsing fails in a complete Rust program using the standard library.
Rust✓ Tested
Transform an optional value
Transform an optional value in a complete Rust program using the standard library.
Rust✓ Tested
Transpose an optional parsing result
Transpose an optional parsing result in a complete Rust program using the standard library.
Rust✓ Tested
Validate UTF-8 bytes
Validate UTF-8 bytes using a complete Go program with explicit sample inputs.
Go✓ Tested
Wrap an error with context
Wrap an error with context using a complete Go program with explicit sample inputs.
Go✓ Tested
Check an external process exit status explicitly
PowerShell: LASTEXITCODE reports a native child exit code independently of ordinary PowerShell cmdlet errors.
PowerShell✓ Tested
Copy a file in bounded binary chunks
C: Check read, write, and close errors while copying without loading the entire file.
C✓ Tested
Delete a known temporary file if present
Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.
Java✓ Tested
Handle a terminating error
Catch conversion failures and produce a clear fallback.
try catch✓ Tested