Skip to content

exceptions

pigwig.exceptions

HTTPException(code: int, body: str)

Bases: Exception

raise in a route handler to generate a non-200 response

Parameters:

Source code in pigwig/exceptions.py
 9
10
11
12
def __init__(self, code: int, body: str) -> None:
	super().__init__(code, body)
	self.code = code
	self.body = body

RouteConflict

Bases: Exception

raised when creating a PigWig app if two routes conflict