-- check that we're not accidentally colliding with an existing name

assert(ReplicatedStorage:FindFirstChild("ErrorReporting", false) == nil,
	"Error Reporter expected to create a folder named 'ErrorReporting', but something already had that name")
local errFolder = Instance.new("Folder", ReplicatedStorage)
errFolder.Name = "ErrorReporting"

local errEvent = Instance.new("RemoteEvent", errFolder)
errEvent.Name = "ClientErrorEvent"

errEvent.OnServerEvent:Connect(function(_, message, stack, origin)
	onError(message, stack, origin)
end)


