[GIT] ppl/ppl(master): ppl_PIP_Problem_get_big_parameter_dimension() now throws

Module: ppl/ppl Branch: master Commit: b2698ee02273622a897d69f3044a2b7dda2410d7 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=b2698ee022736...
Author: Patricia Hill p.m.hill@leeds.ac.uk Date: Thu Apr 8 13:54:23 2010 +0100
ppl_PIP_Problem_get_big_parameter_dimension() now throws an exception if the big parameter has not been set.
---
interfaces/OCaml/ppl_ocaml_common.cc | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/interfaces/OCaml/ppl_ocaml_common.cc b/interfaces/OCaml/ppl_ocaml_common.cc index 291298b..305c569 100644 --- a/interfaces/OCaml/ppl_ocaml_common.cc +++ b/interfaces/OCaml/ppl_ocaml_common.cc @@ -1386,6 +1386,10 @@ ppl_PIP_Problem_get_big_parameter_dimension(value caml_pip) try { CAMLparam1(caml_pip); PIP_Problem& ppl_pip = *p_PIP_Problem_val(caml_pip); dimension_type d = ppl_pip.get_big_parameter_dimension(); + if (d == not_a_dimension()) + throw std::invalid_argument("ppl_PIP_Problem_get_big_parameter_dimension" + "(pip):\n" + "big parameter dimension has not been set."); CAMLreturn(ppl_dimension_to_value(d)); } CATCH_ALL
participants (1)
-
Patricia Hill