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

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;
  [r, w] = pipe ();
  fclose (w);
  fload (r);

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?


OpenPGP: 1142 850E 6DFF 65BA 63D6  88A8 B249 2AC4 A733 0737
Namecoin: id/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