<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Adam, I thought that [error] could be used as the last resort - when something severe happens. <br /><br />What would be the right approach to get rid of multiple enclosed case/if statements? Imagine user input validation in a complex data entry form - all data inconsistencies produce different error messages and all require form resubmission. The code at [1] would be an example of how such error handling could be rewritten, but I would like to declare multiple error types and pattern match them. <br /><br />[1] <a href="https://github.com/grwlf/urweb-monad-pack/blob/master/test/TestError1.ur" target="_blank">https://github.com/grwlf/urweb-monad-pack/blob/master/test/TestError1.ur</a><br /><br /><br /><br />4. Apr 2016 21:48 by <a href="mailto:adamc@csail.mit.edu" target="_blank">adamc@csail.mit.edu</a>:<br /><br /><blockquote class="tutanota_quote" style="border-left: 1px solid #93A3B8; padding-left: 10px; margin-left: 5px;">
The idiomatic approach is just to call the [error] function to end
execution, with an error message.<br />
<br />
<div class="moz-cite-prefix">On 04/03/2016 10:24 PM,
<a target="_blank" class="moz-txt-link-abbreviated" href="mailto:foldr@tutanota.com">foldr@tutanota.com</a> wrote:<br />
</div>
<blockquote class="thunderbird_quote" style="border-left: 1px solid #93a3b8 ; padding-left: 10px ; margin-left: 5px">
<span style="background-color: rgba( 255 , 255 , 255 , 0 )">Hi
all,<br />
<br />
How do I handle application errors in Ur? Is there a preferred
method which allows to check whether all errors have their
handlers or not?<br />
<br />
I am looking for maybe something similar to the below:<br />
<a target="_blank" href="http://sylvain-henry.info/home/posts/2016-03-18-first-experiments-with-dependent-types.html">http://sylvain-henry.info/home/posts/2016-03-18-first-experiments-with-dependent-types.html</a></span><br />
</blockquote></blockquote> </body>
</html>