Throw-New-Errors
Documentation Index
Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt
Use this file to discover all available pages before exploring further.
Sourcery rule id: throw-new-errors
Section titled “Sourcery rule id: throw-new-errors”Description
Section titled “Description”New errors should not be created without being thrown.
new Error("whatever");Explanation
Section titled “Explanation”Although it is valid to construct an error without throwing it, this behaviour is likely unintended: errors must be explicitly thrown.