Shell.ReadErrorText
-------------------

Reads error.

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

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

**MBS**( **"Shell.ReadErrorText";** /\* Reads error. \*/  
**$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

Reads error.  
When child process writes something to error stream, you can read it here.  
  
The plugin internally queries [Shell.AvailableBytesError](ShellAvailableBytesError.md) to see how much to read and return.  
### See also

- [Shell.AvailableBytesError](ShellAvailableBytesError.md)
- [Shell.CloseInput](ShellCloseInput.md)
- [Shell.Execute](ShellExecute.md)
- [Shell.PeekErrorText](ShellPeekErrorText.md)
- [Shell.ReadOutputText](ShellReadOutputText.md)
- [Shell.SetDataAvailableScript](ShellSetDataAvailableScript.md)
- [Shell.WriteInputText](ShellWriteInputText.md)

### Example Databases

- [Mac and iOS/PDFKit/PDFKit Print Documents](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/PDFKit%20Print%20Documents.shtml#4ScriptAnchor_)
- [Shell/Shell Ping](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/Shell%20Ping.shtml#1ScriptAnchor_)
- [Shell/Shell](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/Shell.shtml#1ScriptAnchor_)
- [Shell/Terminal](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Shell/Terminal.shtml#3ScriptAnchor_)

### Blog Entries

- [Convert Office Files in FileMaker](https://www.mbsplugins.de/archive/2022-07-04/Convert_Office_Files_in_FileMa/monkeybreadsoftware_blog_filemaker)
- [Tip of the day: Shell Execute as one Let statement](https://www.mbsplugins.de/archive/2019-11-07/Tip_of_the_day_Shell_Execute_a/monkeybreadsoftware_blog_filemaker)
- [Convert office documents to PDF with LibreOffice](https://www.mbsplugins.de/archive/2018-06-15/Convert_office_documents_to_PD/monkeybreadsoftware_blog_filemaker)
- [Tips for FileMaker Data Migration Tool](https://www.mbsplugins.de/archive/2018-06-09/Tips_for_FileMaker_Data_Migrat/monkeybreadsoftware_blog_filemaker)
- [Execute defaults command with Shell functions](https://www.mbsplugins.de/archive/2017-12-21/Execute_defaults_command_with_/monkeybreadsoftware_blog_filemaker)
- [Convert to MP3 with new Shell commands and ffmpeg](https://www.mbsplugins.de/archive/2017-11-16/Convert_to_MP3_with_new_Shell_/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[Shell.ProcessIdentifier](ShellProcessIdentifier.md) - [Shell.ReadOutputText](ShellReadOutputText.md)

[HTML Version](ShellReadErrorText.shtml)