[Swift-devel] [Bug 106] New: Improve error messages for double-set and un-set variables

bugzilla-daemon at mcs.anl.gov bugzilla-daemon at mcs.anl.gov
Sat Oct 6 11:11:13 CDT 2007


http://bugzilla.mcs.anl.gov/swift/show_bug.cgi?id=106

           Summary: Improve error messages for double-set and un-set
                    variables
           Product: Swift
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: SwiftScript language
        AssignedTo: benc at hawaga.org.uk
        ReportedBy: wilde at mcs.anl.gov


Message for double assignment:

$ cat t10.swift
int a;

a=1;
a=2;

$ swift t10.swift
Swift v0.3 r1319 (modified locally)

RunID: 20071005-0827-f9sriuv3
Execution failed:
        java.lang.IllegalArgumentException: a is already assigned with a value
of 1.0
$ 

ACTION: the presence of Java exceptions should be hidden. The message should
just say:
Execution failure at line x in proc y: variable a is already assigned.

--



$ swift t7.swift
Swift v0.3 r1319 (modified locally)

RunID: 20071005-0805-6v0mxeua
echo started
echo completed
$ cat hello2.txt 
org.griphyn.vdl.mapping.RootDataNode with no value at dataset=m
$ cat t7.swift
type messagefile;

type file;

(messagefile t) echo ( string s1 ) {  
    app {  
        echo s1 stdout=@filename(t);  
    }  
}  

(messagefile t) pecho (string s[] ) {  
    app {  
        echo s[0] stdout=@filename(t);  
    }  
}  

messagefile outfile <"hello2.txt">;  

string m;
string ma[];

outfile = echo( m );

--- to be continued... (mike)


-- 
Configure bugmail: http://bugzilla.mcs.anl.gov/swift/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.



More information about the Swift-devel mailing list