Creator AMA (2024 Recap) with Nick and Greg [January 30, 2025]

I have a question about "Custom Logging - Allowing you to pass error locations through pcalls. (2025)

If we can navigate error lines by passing pcall error locations, could this also work for thread stacks?
One of the inconveniences when scripting in Roblox is that it’s hard to trace where a thread that caused an error was originally created.

For example:

local function createError()
    error("Error!")
end

local function createErrorThread()
    task.spawn(createError)
end

createErrorThread()

Currently, the output logs look like this:

Script:2: Error! - Script:2
  Stack Begin
  Script 'Workspace.Script', Line 2 - function createError - Script:2
  Stack End"

But ideally, it should include where the thread was created, like this:

Script:2: Error! - Script:2
  Stack Begin
  Script 'Workspace.Script', Line 2 - function createError - Script:2
  Script 'Workspace.Script', Line 6 - function createErrorThread - Script:6
  Script 'Workspace.Script', Line 9 - Script:9
  Stack End

Right now, if an error occurs inside a thread, the output doesn’t log where that thread was created, making it difficult to debug.
Especially for custom signal modules, it’s hard to trace which line fired the signal with invalid arguments.

I’m not sure how pcall would pass error locations, but I hope this feature can also help track where an errored thread was originally created.

1 Like