Skip to main content
Log in

Mojo function

abort

abort[result: AnyType = None]() -> $0

Calls a target dependent trap instruction if available.

Parameters:

  • ​result (AnyType): The result type.

Returns:

A null result type.

abort[result: AnyType = None, *, formattable: Formattable](message: formattable) -> $0

Calls a target dependent trap instruction if available.

Parameters:

  • ​result (AnyType): The result type.
  • ​formattable (Formattable): The Formattable type.

Args:

  • ​message (formattable): The message to include when aborting.

Returns:

A null result type.

Was this page helpful?