Rename Error to MCPError (#44)
* Rename Error to MCPError * Conform MCPError to Swift.Error * Use unqualified Error instead of Swift.Error * Use unqualified MCPError instead of MCP.MCPError * Rename file back to Error.swift * Introduce top-level MCP namespace with nested Error typealias to provide deprecation notice for existing usage of MCP.Error * Fix markup for MCP enum warning
This commit is contained in:
parent
a9bcbf9ad9
commit
09da2a1c01
1 changed files with 108 additions and 88 deletions
|
|
@ -57,7 +57,7 @@ struct StdioTransportTests {
|
|||
try writer.close()
|
||||
|
||||
// Start receiving messages
|
||||
let stream: AsyncThrowingStream<Data, Swift.Error> = await transport.receive()
|
||||
let stream: AsyncThrowingStream<Data, Error> = await transport.receive()
|
||||
var iterator = stream.makeAsyncIterator()
|
||||
|
||||
// Get first message
|
||||
|
|
@ -79,7 +79,7 @@ struct StdioTransportTests {
|
|||
try writer.writeAll(invalidJSON.data(using: .utf8)!)
|
||||
try writer.close()
|
||||
|
||||
let stream: AsyncThrowingStream<Data, Swift.Error> = await transport.receive()
|
||||
let stream: AsyncThrowingStream<Data, Error> = await transport.receive()
|
||||
var iterator = stream.makeAsyncIterator()
|
||||
|
||||
_ = try await iterator.next()
|
||||
|
|
@ -100,7 +100,7 @@ struct StdioTransportTests {
|
|||
try await transport.connect()
|
||||
#expect(Bool(false), "Expected connect to throw an error")
|
||||
} catch {
|
||||
#expect(error is MCP.Error)
|
||||
#expect(error is MCPError)
|
||||
}
|
||||
|
||||
await transport.disconnect()
|
||||
|
|
@ -119,7 +119,7 @@ struct StdioTransportTests {
|
|||
try await transport.connect()
|
||||
#expect(Bool(false), "Expected connect to throw an error")
|
||||
} catch {
|
||||
#expect(error is MCP.Error)
|
||||
#expect(error is MCPError)
|
||||
}
|
||||
|
||||
await transport.disconnect()
|
||||
|
|
|
|||
Loading…
Reference in a new issue