Skip to content

Commit

Permalink
Closes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
devSparkle committed May 24, 2023
1 parent 02b2634 commit dae24d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Defaults.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Module.Options = {
MaxBreadcrumbs = 100,
AttachStacktrace = false,
SendDefaultPII = false,
IncludeLocalVariables = true,

ServerName = game.JobId,

Expand Down
6 changes: 4 additions & 2 deletions src/Hub/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ function Hub:CaptureException(ErrorMessage: string?)
local EnvTrace = {}
local EnvCount = 1

while pcall(function() table.insert(EnvTrace, EnvCount, getfenv(EnvCount)) end) do
EnvCount += 1
if self.Options and self.Options.IncludeLocalVariables then
while pcall(function() table.insert(EnvTrace, EnvCount, getfenv(EnvCount)) end) do
EnvCount += 1
end
end

local OriginEnv = EnvTrace[1]
Expand Down

0 comments on commit dae24d9

Please sign in to comment.