Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/structlog/exceptions.py: 83%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

1# SPDX-License-Identifier: MIT OR Apache-2.0 

2# This file is dual licensed under the terms of the Apache License, Version 

3# 2.0, and the MIT License. See the LICENSE file in the root of this 

4# repository for complete details. 

5 

6""" 

7Exceptions factored out to avoid import loops. 

8""" 

9 

10from __future__ import annotations 

11 

12 

13class DropEvent(BaseException): 

14 """ 

15 If raised by an processor, the event gets silently dropped. 

16 

17 Derives from BaseException because it's technically not an error. 

18 """ 

19 

20 

21class NoConsoleRendererConfiguredError(Exception): 

22 """ 

23 A user asked for the current `structlog.dev.ConsoleRenderer` but none is 

24 configured. 

25 

26 .. versionadded:: 25.5.0 

27 """ 

28 

29 

30class MultipleConsoleRenderersConfiguredError(Exception): 

31 """ 

32 A user asked for the current `structlog.dev.ConsoleRenderer` and more than one is configured. 

33 

34 .. versionadded:: 25.5.0 

35 """