avoid-throw
Warns when the throw expression is used.
Use this rule if you prefer to avoid throwing exceptions or errors and instead rely on the result pattern.
Example
❌ Bad:
void fn() {
// LINT: Avoid throw expressions. Try rewriting the code without it.
throw 1;
}
✅ Good:
Result fn() {
return Result(error: true);
}