Skip to content

Commit 592f140

Browse files
committed
Fixes incorrect error description
The OutOfMemory error must be removed from popen.new and popen.read. No versioning required because it was never returned at all for the mentioned functions. Fixes#3608
1 parent 4d62db5 commit 592f140

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

doc/reference/reference_lua/popen.rst

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,20 +165,19 @@ Below is a list of all ``popen`` functions and handle methods.
165165

166166
(if failure) ``nil, err``
167167

168-
Possible raised errors are:
168+
Possible raised errors:
169169

170-
* IllegalParams: incorrect type or value of a parameter
171-
* IllegalParams: group signal is set, while setsid is not
170+
* ``IllegalParams``: incorrect type or value of a parameter
171+
* ``IllegalParams``: group signal is set, while setsid is not
172172

173-
Possible error reasons when ``nil, err`` is returned are:
173+
Possible error reasons when ``nil, err`` is returned:
174174

175-
* SystemError: dup(), fcntl(), pipe(), vfork() or close() fails in the
175+
* ``SystemError``: dup(), fcntl(), pipe(), vfork() or close() fails in the
176176
parent process
177-
* SystemError: (temporary restriction) the parent process has closed stdin,
177+
* ``SystemError``: (temporary restriction) the parent process has closed stdin,
178178
stdout or stderr
179-
* OutOfMemory: unable to allocate the handle or a temporary buffer
180179

181-
Possible ``opts`` items are:
180+
Possible ``opts`` items:
182181

183182
* ``opts.stdin`` (action on STDIN_FILENO)
184183
* ``opts.stdout`` (action on STDOUT_FILENO)
@@ -397,7 +396,7 @@ Below is a list of all ``popen`` functions and handle methods.
397396
:ref:`popen.shell() <popen-shell>`
398397
:param table opts: options
399398

400-
Possible ``opts`` items are:
399+
Possible ``opts`` items:
401400

402401
* ``opts.stdout`` (boolean, default ``true``, if ``true`` then read from stdout)
403402
* ``opts.stderr`` (boolean, default ``false``, if ``true`` then read from stderr)
@@ -415,19 +414,18 @@ Below is a list of all ``popen`` functions and handle methods.
415414

416415
These errors are raised on incorrect parameters or when the fiber is cancelled:
417416

418-
* IllegalParams: incorrect type or value of a parameter
419-
* IllegalParams: called on a closed handle
420-
* IllegalParams: opts.stdout and opts.stderr are both set
421-
* IllegalParams: a requested IO operation is not supported by
417+
* ``IllegalParams``: incorrect type or value of a parameter
418+
* ``IllegalParams``: called on a closed handle
419+
* ``IllegalParams``: opts.stdout and opts.stderr are both set
420+
* ``IllegalParams``: a requested IO operation is not supported by
422421
the handle (stdout / stderr is not piped)
423-
* IllegalParams: attempt to operate on a closed file descriptor
424-
* FiberIsCancelled: cancelled by external code
422+
* ``IllegalParams``: attempt to operate on a closed file descriptor
423+
* ``FiberIsCancelled``: cancelled by external code
425424

426425
``nil, err`` is returned on following failures:
427426

428427
* SocketError: an IO error occurs at read()
429428
* TimedOut: exceeded the opts.timeout quota
430-
* OutOfMemory: no memory space for a buffer to read into
431429
* LuajitError: ("not enough memory"): no memory space for the Lua string
432430

433431
.. _popen-write:

0 commit comments

Comments
 (0)