Skip to content

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.

New errors should not be created without being thrown.

new Error("whatever");

Although it is valid to construct an error without throwing it, this behaviour is likely unintended: errors must be explicitly thrown.