Class Models for Lua

Exception Object
loop.object.Exception
Class of objects used to store structured error information that may be captured and processed by an application or used to produce human-readable error messages. This class is useful to implement expection handling mechanisms.
Each instance may have various fields that describe an error in a structured way so it can be easily processed by an application without the need to parse textual information. Additionally, these instances may be converted or concatenated to string in order to produce textual descriptions of the errors.
Behavior
Initialization
Exception([object])
- Make
object
an instance ofException
. If thedebug
library of Lua is loaded when this class is first required then the stack traceback is captured when eachException
instance is created.
Fields
[1]
[optional]- Name of the exception that is used when the textual message describing the exception is generated.
Meta-Fields
__concat
- Concatenates the textual representation of the exception with a string.
__tostring
- Generates the textual representation of the exception as a string.
Examples
$ExampleDescription
-- example missing
Copyright (C) 2004-2008 Tecgraf, PUC-RioThis project is currently being maintained by Tecgraf at PUC-Rio.