Shell.PeekErrorText
-------------------

Peeks into error output buffer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Shell](component_Shell.md) | [7.5](newinversion75.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ❌ No |

MBS( "Shell.PeekErrorText"; ShellRef { ; Encoding } ) 

**MBS**( **"Shell.PeekErrorText";** /\* Peeks into error output buffer. \*/  
**$ShellRef**; /\* The reference number from the shell.e.g. $shell \*/   
**$Encoding**) /\* Optional; The text encoding for result.e.g. UTF8 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| ShellRef | The reference number from the shell. | $shell |  |
| Encoding | The text encoding for result.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | UTF8 | Optional |

### Result

Returns text or error.

### Description

Peeks into error output buffer.  
Returns data in buffer without removing it.  
  
You need to call [Shell.ReadErrorText](ShellReadErrorText.md) later to actually read the data and remove it from the buffer.  
The plugin internally queries [Shell.AvailableBytesError](ShellAvailableBytesError.md) to see how much to read and return.  
### See also

- [Shell.AvailableBytesError](ShellAvailableBytesError.md)
- [Shell.ReadErrorText](ShellReadErrorText.md)

### Release notes

- **Version 10.1**
    - Fixed bug in [Shell.PeekErrorText](https://www.mbsplugins.eu/ShellPeekErrorText.shtml) function for MacOS.

### Blog Entries

- [MBS FileMaker Plugin, version 10.1pr2](https://www.mbsplugins.de/archive/2020-02-03/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.1pr1](https://www.mbsplugins.de/archive/2020-01-30/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 11st November 2017 , last changed 22nd April 2021

  
[Shell.New](ShellNew.md) - [Shell.PeekOutputText](ShellPeekOutputText.md)

[HTML Version](ShellPeekErrorText.shtml)