Skip to content

Commit

Permalink
dump hlint error
Browse files Browse the repository at this point in the history
  • Loading branch information
JPMoresmau committed Mar 5, 2012
1 parent 4677f59 commit ed3235a
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -29,8 +29,8 @@ public class HLintRunner {

public List<Suggestion> run(IPath path) {
StringWriter err=new StringWriter();
StringWriter out=new StringWriter();
try {
StringWriter out=new StringWriter();
String exe=HLintPlugin.getHlintPath();
if (exe==null || exe.length()==0){
exe="hlint"; // hope it's in the path
Expand All @@ -40,7 +40,8 @@ public List<Suggestion> run(IPath path) {
OutputParser parser = new OutputParser(new StringReader(out.toString()));
return parser.suggestions();
} catch (Throwable ex) {
HLintPlugin.logError(NLS.bind(HLintText.error_run,err.toString()), ex);
String msg=err.toString().length()>0?err.toString():out.toString();
HLintPlugin.logError(NLS.bind(HLintText.error_run,msg), ex);
}
return new ArrayList<Suggestion>();
}
Expand Down

0 comments on commit ed3235a

Please sign in to comment.