OnoUsage
Usage
Last updated:
Usage
Error Wrapping
import { ono } from "@visulima/ono";
try {
await fetchData();
} catch (err) {
throw ono(err, "Failed to fetch data");
}Type-Specific Errors
throw ono.type("TypeError", "Expected string");
throw ono.range("RangeError", "Value out of bounds");With Formatting
throw ono("User %s has %d errors", username, errorCount);