Commit ec7f485c authored by Ignacio Corderi's avatar Ignacio Corderi
Browse files

Refactored Error handling

parent 93b935ca
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -39,8 +39,9 @@
/* Begin PBXFileReference section */
		382D1C00FC0EC4F1BF676411 /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
		3E07EA7E1B78E3B500DAB3F1 /* Kinetic.proto.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Kinetic.proto.swift; sourceTree = "<group>"; };
		3E386E6A1B7F85720040D363 /* Example 2 - Basics.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = "Example 2 - Basics.playground"; sourceTree = "<group>"; };
		3ED681EA1B7CEA0600AFDF79 /* Encoding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Encoding.swift; sourceTree = "<group>"; };
		3ED681EE1B7D0EC600AFDF79 /* Example 2 - Async.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = "Example 2 - Async.playground"; sourceTree = "<group>"; };
		3ED681EE1B7D0EC600AFDF79 /* Example 3 - Async.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = "Example 3 - Async.playground"; sourceTree = "<group>"; };
		3EDAAB3D1B66D32D00F30808 /* Kinetic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Kinetic.framework; sourceTree = BUILT_PRODUCTS_DIR; };
		3EDAAB401B66D32D00F30808 /* Kinetic.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Kinetic.h; sourceTree = "<group>"; };
		3EDAAB421B66D32D00F30808 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -144,7 +145,8 @@
			isa = PBXGroup;
			children = (
				3EF4F82D1B7BE11400E4EB73 /* Example 1 - Hello World.playground */,
				3ED681EE1B7D0EC600AFDF79 /* Example 2 - Async.playground */,
				3E386E6A1B7F85720040D363 /* Example 2 - Basics.playground */,
				3ED681EE1B7D0EC600AFDF79 /* Example 3 - Async.playground */,
			);
			path = examples;
			sourceTree = "<group>";
+0 −16
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>BuildLocationStyle</key>
	<string>UseAppPreferences</string>
	<key>CustomBuildLocationType</key>
	<string>RelativeToDerivedData</string>
	<key>DerivedDataLocationStyle</key>
	<string>Default</string>
	<key>IssueFilterStyle</key>
	<string>ShowActiveSchemeOnly</string>
	<key>LiveSourceIssuesEnabled</key>
	<true/>
</dict>
</plist>
+0 −2
Original line number Diff line number Diff line
@@ -21,9 +21,7 @@
// @author: Ignacio Corderi

public protocol AuthenticationCredential {
    
    func authenticate(builder: Builder)
    
}

public struct HmacCredential: AuthenticationCredential  {
+2 −3
Original line number Diff line number Diff line
@@ -21,10 +21,9 @@
// @author: Ignacio Corderi

public protocol KineticChannel {    
    var error: ErrorType? { get }
    var connected: Bool { get }
    func send(builder: Builder) throws
    func receive() throws -> RawResponse
    func clone() -> KineticSession
    func clone() throws -> KineticSession
    func close()
}
 No newline at end of file
+3 −3
Original line number Diff line number Diff line
@@ -26,12 +26,12 @@ typealias Command = Com.Seagate.Kinetic.Proto.Command
public class Builder {
    internal var message: Message.Builder
    internal var command: Command.Builder
    internal var value: Bytes?
    internal var value: Bytes
    
    internal init() {
        self.message = Message.Builder()
        self.command = Command.Builder()
        self.value = nil
        self.value = []
    }
}

@@ -56,7 +56,7 @@ extension Builder {
public struct RawResponse {
    internal var message: Message
    internal var command: Command
    internal var value: Bytes?
    internal var value: Bytes
}

public protocol ChannelCommand {
Loading