---
title: "CFReadStreamCopyError(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfreadstreamcopyerror(_:)"
---

# CFReadStreamCopyError(_:)

Returns the error associated with a stream.

## Declaration

```swift
func CFReadStreamCopyError(_ stream: CFReadStream!) -> CFError!
```

## Parameters

- `stream`: The stream to examine.

## Return Value

Return Value A CFError object that describes the current problem with stream, or NULL if there is no error. Ownership follows the The Create Rule.

## See Also

### Examining Stream Properties

- [CFReadStreamCopyProperty(_:_:)](corefoundation/cfreadstreamcopyproperty(_:_:).md)
- [CFReadStreamGetBuffer(_:_:_:)](corefoundation/cfreadstreamgetbuffer(_:_:_:).md)
- [CFReadStreamGetError(_:)](corefoundation/cfreadstreamgeterror(_:).md)
- [CFReadStreamGetStatus(_:)](corefoundation/cfreadstreamgetstatus(_:).md)
- [CFReadStreamHasBytesAvailable(_:)](corefoundation/cfreadstreamhasbytesavailable(_:).md)
