Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#193] SML/NJ does not print unhandled exceptions in loaded files

Date:
2018-01-28 02:58
Priority:
3
State:
Open
Submitted by:
Bug Submitter (webuser)
Assigned to:
John Reppy (jhr)
Machine Architecture:
All
Operating System:
Generic Unix
Component:
Compiler
Resolution:
Accepted As Bug
Severity:
Major
OS Version:
Arch Linux
SML/NJ Version:
110.82
Keywords:
exceptions, reporting, file
URL:
Transcript (of reproduction):
Standard ML of New Jersey v110.82 [built: Mon Oct 23 10:28:15 2017] - use "test.sml"; [opening test.sml] val it = () : unit -
Source (for reproduction):
val _ = 1 div 0
Summary:
SML/NJ does not print unhandled exceptions in loaded files

Detailed description
We use SML/NJ to teach SML to freshmen and sophomores.
We currently have version 110.81 running on university machines.

Some students who are using version 110.82 on personal machines are
reporting that run-time errors in 'use'd files go unreported. For
instance, raised but unhandled Div and Bind exceptions are not
reported: 'use' returns without any direct indication on the screen
of any error. This new behavior complicates teaching the difference
between compile-time and run-time errors, and it is affecting some
student code testing.

We have replicated the behavior on one of our machines, with specs as
indicated in the bug-report fields.

If this new behavior is intentional, is there some way of determining
from 'use' that a run-time exception has occurred and where it has
occurred? If the new behavior is inadvertent, would it be possible to
revert to the prior behavior (or provide an alternative 'use' function)?

Thank you!
Additional comments:
It seems that loading of the file stops on reaching an error, but
any previously-defined variables in the file are properly bound.
This leads us to believe that the internal machinery invoked by the
"use" directive is incorrectly aborting the program with an "exit
code" (as if the file were loaded with the command "smlnj
test.sml" from a shell).

Submitted via web form by Cameron Wong <cjwong@andrew.cmu.edu>

Comments:

No Comments Have Been Posted

Attached Files:

Changes

Field Old Value Date By
Machine ArchitectureNone2018-01-28 14:07jhr
ResolutionNone2018-01-28 14:07jhr
Transcript (of reproduction)Standard ML of New Jersey v110.82 [built: Mon Oct 23 10:28:15 2017] - use "test.sml"; [opening test.sml] val it = () : unit - 2018-01-28 14:07jhr
assigned_tonone2018-01-28 14:07jhr
details We use SML/NJ to teach SML to freshmen and sophomores. We currently have version 110.81 running on university machines. Some students who are using version 110.82 on personal machines are reporting that run-time errors in 'use'd files go unreported. For instance, raised but unhandled Div and Bind exceptions are not reported: 'use' returns without any direct indication on the screen of any error. This new behavior complicates teaching the difference between compile-time and run-time errors, and it is affecting some student code testing. We have replicated the behavior on one of our machines, with specs as indicated in the bug-report fields. If this new behavior is intentional, is there some way of determining from 'use' that a run-time exception has occurred and where it has occurred? If the new behavior is inadvertent, would it be possible to revert to the prior behavior (or provide an alternative 'use' function)? Thank you! Additional comments: It seems that loading of the file stops on reaching an error, but any previously-defined variables in the file are properly bound. This leads us to believe that the internal machinery invoked by the "use" directive is incorrectly aborting the program with an "exit code" (as if the file were loaded with the command "smlnj test.sml" from a shell). Submitted via web form by Cameron Wong <cjwong@andrew.cmu.edu> 2018-01-28 14:07jhr