diff options
Diffstat (limited to 'sourcecodes/execute_bn_gom.php')
| -rw-r--r-- | sourcecodes/execute_bn_gom.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sourcecodes/execute_bn_gom.php b/sourcecodes/execute_bn_gom.php index 113841cc..3ff3f6e0 100644 --- a/sourcecodes/execute_bn_gom.php +++ b/sourcecodes/execute_bn_gom.php @@ -48,6 +48,8 @@ $thr=file_get_contents("$thrfile"); //$thr=valid_input($thr); $thr=trim($thr); +$bnw_error = NULL; +try { runTerminalCommand([realpath(__DIR__).'/run.sh', $keyval, $maxp, $maxk, $thr]); /////////////////////////////////structure matrix////////////////////////////////////////////////////////// @@ -114,6 +116,24 @@ if ($fout !== false) { runTerminalCommand([realpath(__DIR__.'/run_scripts/run_octave'), $keyval]); +} catch (Exception $e) { + $bnw_error = $e->getMessage(); +} + +if(!is_null($bnw_error)) +{ + // Structure learning failed: show it on the status page instead of + // a blank fatal error page with no forward. + ?> + <p style="color: red;">Structure learning FAILED:</p> + <pre><?php print(htmlspecialchars($bnw_error)); ?></pre> + <p><a href="bn_genenet.php">Back to the data upload page</a></p> + </div> + </body> + </html> + <?php + exit(1); +} ?> <script> |
