Exception

(in ./Carbon/Exception.lua)

Signals detailed, strongly-typed error conditions.

Inherits OOP.Object


Methods

class public Exception:New(string message)

Returns Exception

class public Exception:PlacementNew(Exception? out, string message)

Returns Exception

object public Exception:Init(string message)

Returns void

  • required message: The message to initialize the exception with.

Creates a new generic exception with the given message.


object public Exception:Throw([uint level])

Returns void

  • optional level: An optional parameter passed onto Lua's error function.

Throws the exception as a traditional Lua error.


Properties

public string Exception.Message

An error message explaining the exception.