merge impl-v2: plugin

This commit is contained in:
Lucien Greathouse
2018-06-10 22:53:22 -07:00
parent 7d7f671920
commit e30545c132
13 changed files with 243 additions and 859 deletions

View File

@@ -10,6 +10,9 @@ HttpError.Error = {
message = "Rojo plugin couldn't connect to the Rojo server.\n" ..
"Make sure the server is running -- use 'Rojo serve' to run it!",
},
Timeout = {
message = "Rojo timed out during a request.",
},
Unknown = {
message = "Rojo encountered an unknown error: {{message}}",
},
@@ -44,7 +47,11 @@ function HttpError.fromErrorString(err)
end
if err:find("^curl error") then
return HttpError.new(HttpError.Error.ConnectFailed)
if err:find("couldn't connect to server") then
return HttpError.new(HttpError.Error.ConnectFailed)
elseif err:find("timeout was reached") then
return HttpError.new(HttpError.Error.Timeout)
end
end
return HttpError.new(HttpError.Error.Unknown, err)