Skip to content

Commit

Permalink
Better error msg when test case has syntax error
Browse files Browse the repository at this point in the history
Close #64.
  • Loading branch information
jakub-g committed Jan 7, 2014
1 parent 760f9fe commit a568c69
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/test-type/aria-templates/at-environment.js
Expand Up @@ -77,9 +77,17 @@ ATEnvironment.prototype.readATClasspath = function (classpath, callback) {
};
var handleResult = function (result) {
if (filePath && result.classpath != classpath) {
var msg;
if (!result.classpath) {
msg = "File '%s' doesn't contain the class '%s'. Check for the syntax errors in the file.";
result.classpath = "";
} else {
msg = "File '%s' should contain classpath '%s' but it contains '%s'.";
}

result = {
error: {
message: "File '%s' should contain classpath '%s' but it contains '%s'.",
message: msg,
args: [filePath, classpath, result.classpath]
}
};
Expand Down

0 comments on commit a568c69

Please sign in to comment.