hpcflow.sdk.compact_errors.FormatMixin#
- class hpcflow.sdk.compact_errors.FormatMixin#
Bases:
objectA mixin for CompactException and CompactWarning that provides a default format method.
Methods
Default formatter for rendering a CompactException or CompactWarning using Rich.
- format(title, subtitle, colour, filename, lineno, console=None)#
- classmethod get_formatted_problem(obj, title, subtitle, colour, filename, lineno, console=None)#
Default formatter for rendering a CompactException or CompactWarning using Rich.
This will also render any Exception or Warning object, but we don’t use it to do that. To use a custom formatter, define a format method on the CompactException or CompactWarning sub-class.