---
title: "CFReadStreamGetError(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfreadstreamgeterror(_:)"
---

# CFReadStreamGetError(_:)

Returns the error status of a stream.

## Declaration

```swift
func CFReadStreamGetError(_ stream: CFReadStream!) -> CFStreamError
```

## Parameters

- `stream`: The stream to examine.

## Return Value

Return Value The error status of stream returned in a CFStreamError structure.

## Discussion

Discussion The error field is 0 if no error has occurred. If the error field is not 0, the domain field contains a code that identifies the domain in which the value of the error field should be interpreted.

## See Also

### Examining Stream Properties

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