Skip to main content

Mojo function

abort

abort() -> Never

Terminates execution, using a target dependent trap instruction if available.

Returns:

Never

abort[*, prefix: StringSlice[StaticConstantOrigin] = StringSlice("ABORT:")](message: String, *, location: Optional[SourceLocation] = Optional()) -> Never

Calls a target dependent trap instruction if available.

Parameters:

  • prefix (StringSlice): A static string prefix to include before the message.

Args:

  • message (String): The message to include when aborting.
  • location (Optional): The optional source location to include.

Returns:

Never

abort[*, prefix: StringSlice[StaticConstantOrigin] = StringSlice("ABORT:")](message: TString[message.format_string, message.Ts], *, location: Optional[SourceLocation] = Optional()) -> Never

Calls a target dependent trap instruction if available.

Parameters:

  • prefix (StringSlice): A static string prefix to include before the message.

Args:

  • message (TString): The t-string message to include when aborting.
  • location (Optional): The optional source location to include.

Returns:

Never

Was this page helpful?