Thank you!

2016-06-15 22:23 GMT+03:00 Rob Arthan <[email protected]>:

> Kostriya,
>
>
> Gergely’s answer is right. When you build a stand-alone executable,
> your ML code has to do all the input and output. If you want to report
> exceptions you need to handle them and take appropriate action. E.g.,
>
> fun main () = ( print "Start\n"; raise Ex; print "The End\n" )
> handle exc => (
> print ("function main raised an exception: " ^ exnMessage exc ^ "\n"
> )
> );
>
> Regards,
>
> Rob.
>
>
> On 15 Jun 2016, at 18:33, Gergely Buday <[email protected]> wrote:
>
> The compiled code will not display uncaught exceptions but the execution
> stops.
>
> - Gergely
>
> On Wednesday, 15 June 2016, Kostirya <[email protected]> wrote:
>
>> Hello.
>> Why when executed file, exception is not printed? Is it OK?
>>
>> > cat foo.sml
>> exception Ex
>> fun main () = ( print "Start\n"; raise Ex; print "The End\n" )
>>
>> > ( cat foo.sml ; echo 'val _ = main ()' ) | poly
>> Poly/ML 5.6 Release
>> Start
>> Exception- Ex raised
>>
>> > polyc foo.sml && ./a.out
>> Start
>> >
>>
>> Best, Nick.
>>
> _______________________________________________
> polyml mailing list
> [email protected]
> http://lists.inf.ed.ac.uk/mailman/listinfo/polyml
>
>
>
_______________________________________________
polyml mailing list
[email protected]
http://lists.inf.ed.ac.uk/mailman/listinfo/polyml

Reply via email to