-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from vapor-community/develop
Vapor 3
- Loading branch information
Showing
22 changed files
with
211 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: 2 | ||
|
||
jobs: | ||
macos: | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- run: brew install vapor/tap/vapor | ||
- checkout | ||
- run: swift build | ||
- run: swift test | ||
|
||
linux: | ||
docker: | ||
- image: swift:4.0 | ||
steps: | ||
- run: apt-get install -yq libssl-dev | ||
- checkout | ||
- run: swift build | ||
- run: swift test | ||
|
||
workflows: | ||
version: 2 | ||
tests: | ||
jobs: | ||
- macos | ||
- linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// Represents an error that occurs during a service action. | ||
public enum ServiceError: Error, CustomStringConvertible { | ||
|
||
/// Thrown when no service is registered with a given name. | ||
case noServiceFound(String) | ||
|
||
/// Thrown when no `FederatedSewrvice` type is found whgen creating a `Service` from JSON. | ||
case noExistingService(String) | ||
|
||
/// Thrown when a `FederatedCreatable` type has a `serviceKey` that does not match any available endpoints in the service. | ||
case noServiceEndpoint(String) | ||
|
||
public var description: String { | ||
switch self { | ||
case let .noServiceFound(name): return "No service was found with the name '\(name)'" | ||
case let .noExistingService(name): return "No service exists with the name '\(name)'" | ||
case let .noServiceEndpoint(endpoint): return "Service does not have available endpoint for key '\(endpoint)'" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.