Package showing error message even when caught

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Package showing error message even when caught

Daniel Kraft
Hi!

I just noticed something weird:  With the code below, the error message
generated by "fload" for reading from an EOF stream ("could not read
binary header") is printed even though the error is caught (although
execution continues without an error being flagged, which is correct).
The Octave documentation for try-catch clearly states that also error
messages are not printed.

pkg load parallel;
try
  [r, w] = pipe ();
  fclose (w);
  fload (r);
catch
end_try_catch

If I use "error" directly in the try-catch block or even if using a
simple .oct file that just creates an error, then no message is printed
as expected.  But with the error generated from the parallel package's
"fload", it *is* shown.  So maybe it is related to the error being
thrown from out of a package?

I see this both on Octave 4.0.3 and 5.1.

Is this expected behaviour or a bug?

Yours,
Daniel

--
https://www.domob.eu/
OpenPGP: 1142 850E 6DFF 65BA 63D6  88A8 B249 2AC4 A733 0737
Namecoin: id/domob -> https://nameid.org/?name=domob
--
3.6.0: Bar-Pri-Ran-Rog-Sam-Val-Wiz
To go: Arc-Cav-Hea-Kni-Mon-Tou


signature.asc (849 bytes) Download Attachment