<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 10 January 2018 at 05:12, Ralph Versteegen <span dir="ltr"><<a href="mailto:teeemcee@gmail.com" target="_blank">teeemcee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>There's no such feature. Its absence is certainly a nuisance for writing test cases.<br></div>(hspeaktest.py can check for compile-time warnings and errors, but not run-time ones)<br><br></div>I didn't have any ideas for a try/except block statement. I thought that people wouldn't use it much since most wouldn't be familiar with exceptions, and the additional complexity, didn't seem to justify it.<br></div>But maybe a more coarse-grained ability to specify a global (or per-script or per-fibre) error handler would be useful. Either just for our purposes, or as a public feature.</div><div>Incidentally, lua doesn't have try/except, but it has a special way to call a function so that you catch errors inside it (pcall).<br></div></div></blockquote><div><br></div><div>Also, when it comes to the differences between release and debug modes, I suppose that you could use error catching either to catch errors that will actually be shown to the user (so you can customise that), or to catch errors (oh a certain errorlevel?) regardless of whether they're shown, which useful for testcases... but what use would there be? Because we want to be able to assume everyone uses release mode, and add new error checking, I think any other uses of error checking would make adding more error checking a back-compat problem again :/<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 9 January 2018 at 05:17, James Paige <span dir="ltr"><<a href="mailto:Bob@hamsterrepublic.com" target="_blank">Bob@hamsterrepublic.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div>I was working on some ellipse slice tests, and I realized that I am not aware of any way to assert that a script error has occurred.<br><br></div>...And as I am typing this, I realize that feature would be almost the same thing as having a python-style try/except structure.<br><br></div>Do we have any plans for try/except in the future?<br><br></div>And if we did, how would it handle the difference between runtime-hide-all-errors and test-time-show-all-errors?<br><br></div>---<br></div>James<br></div>
<br></div></div>______________________________<wbr>_________________<br>
Ohrrpgce mailing list<br>
<a href="mailto:ohrrpgce@lists.motherhamster.org" target="_blank">ohrrpgce@lists.motherhamster.o<wbr>rg</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" rel="noreferrer" target="_blank">http://lists.motherhamster.org<wbr>/listinfo.cgi/ohrrpgce-motherh<wbr>amster.org</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div>