Skip to content

Commit

Permalink
Only show command errors during debugmode (#1763)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccuser44 authored Nov 24, 2024
1 parent 2c294d8 commit 99a967e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions MainModule/Server/Core/Process.luau
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,11 @@ return function(Vargs, GetEnv)
end

if rateExceeded and not ratePass then
rateExceeded:fire(rateKey, rateCache.Rate, maxRate)
rateExceeded:Fire(rateKey, rateCache.Rate, maxRate)
end

if ratePassed and ratePass then
ratePassed:fire(rateKey, rateCache.Rate, maxRate)
ratePassed:Fire(rateKey, rateCache.Rate, maxRate)
end

return ratePass, didThrottle, canThrottle, rateCache.Rate, maxRate, throttleResetOs
Expand Down Expand Up @@ -592,7 +592,9 @@ return function(Vargs, GetEnv)
Remote.MakeGui(p, "Output", {
Message = cmdError,
})
warn(`Encountered an error while running a command: {msg}\n{cmdError}\n{debug.traceback()}`)
if Core.DebugMode == true then
warn(`Encountered an error while running a command: {msg}\n{cmdError}\n{debug.traceback()}`)
end
end
elseif cmdError ~= nil and cmdError ~= true and not isSystem then
Remote.MakeGui(p, "Output", {
Expand Down

0 comments on commit 99a967e

Please sign in to comment.