Mojo function
error
error[T: Stringable](graph: Optional[Graph], message: T, location: Optional[_SourceLocation] = #kgen.none) -> Error
Creates an error to raise that includes call information.
This should be called internally at every point that can raise inside Graph API. By default, this only includes the specific call site of the raise. We hope to improve this in the future.
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 error message augmented with call context information.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
π What went wrong?