| 118 | |
| 119 | |
| 120 | |
| 121 | == Error handling |
| 122 | PyRunner uses the stdin and stderr channels to communicate with python. |
| 123 | |
| 124 | If an IOException occurs on these channels, this error is forwarded to you. |
| 125 | |
| 126 | If a python call writes something to stderr, this is always interpreted as an error message. A PythonError will be thrown containing this message. |
| 127 | |
| 128 | If you just used {{{call()}}}, then the text that came back through stdin is forwarded to you are a result. |
| 129 | |
| 130 | If you called {{{test()}}} however, then the stdout stream is used to report the test results. If you write anything to the stdout stream (eg with print()) then this will corrupt the stdout stream, resulting in a parsing error. |