diff --git a/Runner.php b/Runner.php index b0e5383..abaeb7c 100644 --- a/Runner.php +++ b/Runner.php @@ -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; } } } diff --git a/engine.php b/engine.php index c0ecfbc..d8ac2be 100644 --- a/engine.php +++ b/engine.php @@ -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); }