trishullab / askbayou

Apache License 2.0
2 stars 0 forks source link

Bad error message when entering code with multiple holes and code with syntax error #21

Open swaratchaudhuri opened 7 years ago

swaratchaudhuri commented 7 years ago

(This is closely related to issue #16.)

Here is some code I entered in Askbayou:

import edu.rice.cs.caper.bayou.annotations.Evidence;

public class TestIO1 {
    void read(String file) {
        Evidence.apicalls("readLine");
    }     
    void foo(String file) {
        Evidence.apicalls("readLine");
    }  
}

This leads to to two bad things:

1) The message "Unexpected error. Please retry." This is a bad error message. Bayou should return a message that clarifies that we only allow one hole in the code at one time, and Askbayou should deliver this message.

2) The "synthesize" button goes away. Note that this doesn't happen on successful termination, and it shouldn't happen in this error case either.

It seems like the same sorts of problems arise when we have a syntax error in the draft:

import edu.rice.cs.caper.bayou.annotations.Evidence;
public class TestIO1 {
    // Read from a file
    void read(String file) {
        Evidence.apicalls("readLine")
    }   
}
rmbarnett-rice commented 7 years ago

Commit 42fa463 addresses the search button not showing after an unexpected error. This was an artefact of the old UI where the error messages and search button were in the same place.

rmbarnett-rice commented 7 years ago

This is related to https://github.com/capergroup/bayou/issues/41