---
title: "CFWriteStreamCopyError(_:)"
framework: corefoundation
role: symbol
role_heading: Function
path: "corefoundation/cfwritestreamcopyerror(_:)"
---

# CFWriteStreamCopyError(_:)

Returns the error associated with a stream.

## Declaration

```swift
func CFWriteStreamCopyError(_ stream: CFWriteStream!) -> 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

- [CFWriteStreamCanAcceptBytes(_:)](corefoundation/cfwritestreamcanacceptbytes(_:).md)
- [CFWriteStreamCopyProperty(_:_:)](corefoundation/cfwritestreamcopyproperty(_:_:).md)
- [CFWriteStreamGetError(_:)](corefoundation/cfwritestreamgeterror(_:).md)
- [CFWriteStreamGetStatus(_:)](corefoundation/cfwritestreamgetstatus(_:).md)
