Skip to content

Commit

Permalink
Add note to DEVELOPING re panics
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
  • Loading branch information
StephenWakely committed May 2, 2023
1 parent 7570bb3 commit 8e46b3a
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 8e46b3a

Please sign in to comment.