Skip to content

Commit

Permalink
chore: add note to DEVELOPING.md re panics (vectordotdev#17277)
Browse files Browse the repository at this point in the history
Add note to DEVELOPING re panics

Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
  • Loading branch information
StephenWakely authored May 2, 2023
1 parent f696e7b commit 03e905e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,17 @@ Yep!
warn!(message = "Failed to merge value.", %error);
```

#### Panics

As a general rule, code in Vector should *not* panic.

However, there are very rare situations where the code makes certain assumptions
about the given state and if those assumptions are not met this is clearly due
to a bug within Vector. In this situation Vector cannot safely proceed. Issuing
a panic here is acceptable.

All potential panics *MUST* be clearly documented in the function documentation.

### Feature flags

When a new component (a source, transform, or sink) is added, it has to be put
Expand Down

0 comments on commit 03e905e

Please sign in to comment.