Skip to main content
Log in

Mojo function

format_error

format_error[T: Stringable](graph: Optional[Graph], message: T, location: Optional[_SourceLocation] = #kgen.none) -> String

Formats an error string that includes call information.

Parameters:

  • T (Stringable): The message type.

Args:

  • graph (Optional[Graph]): The graph for context information.
  • message (T): An error message to raise.
  • location (Optional[_SourceLocation]): An optional location for a more specific error message.

Returns:

The string for an error message augmented with call context information.

Was this page helpful?