navigation

FavourReRaise (FL0073)

Introduced in 0.21.1

Cause

An exception was re-thrown (re-raised) without the use of function reraise().

Rationale

Using raise ex (inside a try..with|ex block) to re-raise an exception is not ideal, as it loses valuable stacktrace information from the original exception.

How To Fix

Use reraise() instead of raise ex.

Rule Settings

{
    "favourReRaise": {
       "enabled": true
    }
}