mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Unify logging
This commit is contained in:
parent
dd4d542d7e
commit
061ea0e7a3
6 changed files with 70 additions and 42 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue