For the complete documentation index, see llms.txt. This page is also available as Markdown.

Error Handling

About

In knight error handling is handled by the framework with some basic logging. You can hook into this through the OnError event to log them externally to a API like Sentry.

We recommend using sentry-roblox by devSparkle and integrating it with Knight.

Examples

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage:WaitForChild("Packages")

local require = require(require(Packages:WaitForChild("knight")).import)
local errorHandler = require("core/class/ErrorHandler")

(errorHandler.OnError :: BindableEvent).Event:Connect(function(errorPayload: {
    runType: string;
    isShared: boolean;
    child: Instance;
    trace: string;
    message: string;
    timestamp: number;
})
    -- Your custom error handling here
end)

Last updated