Docs Update

This commit is contained in:
Robert Jelic
2025-02-18 09:46:32 +01:00
parent d821bfd6a6
commit 8b6eaccd18
33 changed files with 1477 additions and 418 deletions

View File

@@ -1,5 +1,9 @@
local LOGGER = require("log")
--- This is Basalt's error handler. All the errors are handled by this module.
--- @class ErrorHandler
--- @field tracebackEnabled boolean If the error handler should print a stack trace
--- @field header string The header of the error message
local errorHandler = {
tracebackEnabled = true,
header = "Basalt Error"
@@ -11,6 +15,9 @@ local function coloredPrint(message, color)
term.setTextColor(colors.white)
end
--- Handles an error
--- @param errMsg string The error message
--- @usage errorHandler.error("An error occurred")
function errorHandler.error(errMsg)
if errorHandler.errorHandled then
error()