/** * Cancel the experiment with the given ID * @param $expId */ public static function cancel_experiment($expId) { try { Airavata::terminateExperiment($expId); Utilities::print_success_message("Experiment canceled!"); } catch (InvalidRequestException $ire) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>InvalidRequestException: ' . $ire->getMessage() . '</p>'); } catch (ExperimentNotFoundException $enf) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>ExperimentNotFoundException: ' . $enf->getMessage() . '</p>'); } catch (AiravataClientException $ace) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>AiravataClientException: ' . $ace->getMessage() . '</p>'); } catch (AiravataSystemException $ase) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>AiravataSystemException: ' . $ase->getMessage() . '</p>'); } catch (TTransportException $tte) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>TTransportException: ' . $tte->getMessage() . '</p>'); } catch (Exception $e) { Utilities::print_error_message('<p>There was a problem canceling the experiment. Please try again later or submit a bug report using the link in the Help menu.</p>' . '<p>Exception: ' . $e->getMessage() . '</p>'); } }