On Fri, Oct 7, 2016 at 11:10 AM, Peter Damoc <[email protected]> wrote:
>
> If you can come up with a practical scenario where you would have an
> exception, I or someone else around here could tell you what would happen
> in Elm in that context.
>
Yes. The example I gave when I started the thread (sorry for the java
syntax - i'm new):
function foo(int x) throws IllegalArgumentException{
if(x > 10) throw new IllegalArgumentException("Bad x");
return x * x * x;
}
Finally, you do have the option of crashing the entire program with
> Debug.crash
>
This sounds pretty similar to throw.
I'll have to play around with Debug.crash and Result.andThen a bit before
continuing my complaining.
Thank you everyone for your patience and thoughtful responses.
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.