---
title: standardError
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/process/standarderror
---

# standardError

The standard error for the receiver.

## Declaration

```swift
var standardError: Any? { get set }
```

## Parameters

- `file`: The standard error for the receiver, which can be either an doc://com.apple.foundation/documentation/Foundation/FileHandle or an doc://com.apple.foundation/documentation/Foundation/Pipe object.

## Discussion

Discussion If file is an NSPipe object, launching the receiver automatically closes the write end of the pipe in the current task. Don’t create a handle for the pipe and pass that as the argument, or the system won’t automatically close the write end of the pipe. If this method isn’t used, the standard error is inherited from the process that created the receiver. This method raises an NSInvalidArgumentException if the system has lauched the receiver.

## See Also

### Configuring a process

- [arguments](foundation/process/arguments.md)
- [currentDirectoryURL](foundation/process/currentdirectoryurl.md)
- [environment](foundation/process/environment.md)
- [executableURL](foundation/process/executableurl.md)
- [qualityOfService](foundation/process/qualityofservice.md)
- [standardInput](foundation/process/standardinput.md)
- [standardOutput](foundation/process/standardoutput.md)
