Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Return error and check type for error case #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Runner.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function run($files)
return $resultFile;
} catch (Exception $e) {
error_log("Exception: " . $e->getMessage() . " in " . $e->getFile() . "\n" . $e->getTraceAsString());
return "cc_exception_thrown";
return $e;
}
}
}
9 changes: 4 additions & 5 deletions engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,11 @@

$results = $server->get_all_results();

// If there is no output from the runner, an exception must have occurred
foreach ($results as $result_file) {
if ($result_file = "cc_exception_thrown") {
if (is_a($result_file, "Exception")) {
exit(1);
} else {
echo file_get_contents($result_file);
unlink($result_file);
}

echo file_get_contents($result_file);
unlink($result_file);
}