Unify logging

This commit is contained in:
Lucien Greathouse
2018-12-03 16:24:28 -08:00
parent dd4d542d7e
commit 061ea0e7a3
6 changed files with 70 additions and 42 deletions

View File

@@ -1,3 +1,8 @@
local Selection = game:GetService("Selection")
local HttpService = game:GetService("HttpService")
local Logging = require(script.Parent.Logging)
local HttpError = {}
HttpError.__index = HttpError
@@ -58,9 +63,10 @@ function HttpError.fromErrorString(err)
end
function HttpError:report()
warn(self.message)
Logging.warn(self.message)
if self.type == HttpError.Error.HttpNotEnabled then
game:GetService("Selection"):Set{game:GetService("HttpService")}
Selection:Set(HttpService)
end
end