<div dir="ltr">On Fri, Aug 30, 2013 at 5:41 AM, Kathrin Burckhardt <span dir="ltr"><<a href="mailto:tribur@itis.ethz.ch" target="_blank">tribur@itis.ethz.ch</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi petsc people,<br>
<br>
how can I check if the value to a specific option is valid before getting an error?<br></blockquote><div><br></div><div>Right now the options table only holds strings. The conversion is done by the</div><div>retrieval function, so there is no centralized knowledge about an a priori type</div>
<div>of the option value. The failure can occur anywhere in the code where someone</div><div>tries to get the value with a conflicting type.</div><div><br></div><div>  Thanks,</div><div><br></div><div>      Matt</div><div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
E.g., if the option string contains 'options_table 2' I get<br>
<br>
[ERROR]: --------------------- Error Message ------------------------------------<br>
[ERROR]: [0]PETSC ERROR:<br>
[INFO]: Invalid argument!<br>
[ERROR]: [0]PETSC ERROR:<br>
[INFO]: Unknown logical value: 2!<br>
<br>
Thank you in advance for your help,<br>
Kathrin<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener
</div></div>