MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / UIError

Class UIError

misc/python/materialize/ui.py:160–181  ·  view source on GitHub ↗

An error intended for display to humans. Use this exception type when the error is something the user can be expected to handle. If the error indicates a truly unexpected condition (i.e., a programming error), use a different exception type that will produce a backtrace instead.

Source from the content-addressed store, hash-verified

158
159
160class UIError(Exception):
161 """An error intended for display to humans.
162
163 Use this exception type when the error is something the user can be expected
164 to handle. If the error indicates a truly unexpected condition (i.e., a
165 programming error), use a different exception type that will produce a
166 backtrace instead.
167
168 Attributes:
169 hint: An optional hint to display alongside the error message.
170 """
171
172 def __init__(self, message: str, hint: str | None = None):
173 super().__init__(message)
174 self.hint = hint
175
176 def set_hint(self, hint: str) -> None:
177 """Attaches a hint to the error.
178
179 This method will overwrite the existing hint, if any.
180 """
181 self.hint = hint
182
183
184class CommandFailureCausedUIError(UIError):

Callers 15

workflow_defaultFunction · 0.90
measure_dbbenchMethod · 0.90
reconfigure_envd_cpusFunction · 0.90
wait_for_envdFunction · 0.90
workflow_defaultFunction · 0.90
workflow_plotFunction · 0.90
workflow_defaultFunction · 0.90
check_retain_historyFunction · 0.90
workflow_defaultFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_caseMethod · 0.72