<html dir="ltr"><head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body style="text-align:left; direction:ltr;"><div>Am Freitag, dem 04.02.2022 um 09:27 +0100 schrieb Fabrice Nicol:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
    <p>Hi Volker</p>
    <blockquote type="cite" cite="mid:9e86fd24e8505d3644ad14cba311bbf7fbb786f3.camel@volker-wysk.de" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><br>
      <pre>I want to read the contents of a file, using open_input,</pre><pre>read_file_as_string, close_input. In case the file doesn't exist, I want to</pre><pre>return an empty string. So, in case of an error, I want to determine if it's</pre><pre>because the file doesn't exist.</pre><pre><br></pre><pre>It isn't a show stopper to me, I can return "" in case of any error, but it</pre><pre>isn't optimal.</pre><pre><br></pre><pre>Cheers,</pre><pre>Volker</pre>
    </blockquote>
    <p>Why do you need to test according to io.error? <br>
    </p>
    <p>io.error will only "materialize" logical failure. Which takes
      place further up in the tree.</p></blockquote><div>I don't get it.</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
    <p>So you just need to test against open_input out-mode argument
      values.<br>
    </p>
    <p>Have you tried something along these lines?</p></blockquote><div>I need to distinguish between "file does not exist" errors and other errors. I want the other errors stay errors, which will get reported later. Only "file does not exist" errors should be ignored.</div><div><br></div><div>Cheers, Volker</div></body></html>