.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.exceptions.SearxParameterException Class Reference
Inheritance diagram for searx.exceptions.SearxParameterException:
Collaboration diagram for searx.exceptions.SearxParameterException:

Public Member Functions

 __init__ (self, str name, t.Any value)

Public Attributes

str message = message
str parameter_name = name
t.Any parameter_value = value

Detailed Description

Raised when query miss a required parameter

Definition at line 13 of file exceptions.py.

Constructor & Destructor Documentation

◆ __init__()

searx.exceptions.SearxParameterException.__init__ ( self,
str name,
t.Any value )

Definition at line 16 of file exceptions.py.

16 def __init__(self, name: str, value: t.Any):
17 if value == '' or value is None:
18 message = f"Empty {name} parameter"
19 else:
20 message = f"Invalid value {value} for parameter {name}"
21 super().__init__(message)
22 self.message: str = message
23 self.parameter_name: str = name
24 self.parameter_value: t.Any = value
25
26
27@t.final

Member Data Documentation

◆ message

str searx.exceptions.SearxParameterException.message = message

Definition at line 22 of file exceptions.py.

◆ parameter_name

str searx.exceptions.SearxParameterException.parameter_name = name

Definition at line 23 of file exceptions.py.

◆ parameter_value

t.Any searx.exceptions.SearxParameterException.parameter_value = value

Definition at line 24 of file exceptions.py.


The documentation for this class was generated from the following file: