
Module: ppl/ppl Branch: master Commit: 0cf98127510beb73d5d9f8a5fbb72c8c1b740853 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=0cf98127510be...
Author: Patricia Hill p.m.hill@leeds.ac.uk Date: Thu Mar 18 15:08:15 2010 +0000
Added std::logic_error to the list of exceptions caught.
---
interfaces/OCaml/ppl_ocaml_common.defs.hh | 4 ++++ interfaces/Prolog/ppl_prolog_common.defs.hh | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/interfaces/OCaml/ppl_ocaml_common.defs.hh b/interfaces/OCaml/ppl_ocaml_common.defs.hh index fde6a8e..db969a8 100644 --- a/interfaces/OCaml/ppl_ocaml_common.defs.hh +++ b/interfaces/OCaml/ppl_ocaml_common.defs.hh @@ -209,6 +209,10 @@ catch(std::exception& e) { \ caml_raise_with_string(*caml_named_value("PPL_unknown_standard_exception"), \ (const_cast<char*>(e.what()))); \ } \ +catch(std::logic_error& e) { \ + caml_raise_with_string(*caml_named_value("PPL_logic_error"), \ + (const_cast<char*>(e.what()))); \ +} \ catch(timeout_exception&) { \ reset_timeout(); \ caml_raise_constant(*caml_named_value("PPL_timeout_exception")); \ diff --git a/interfaces/Prolog/ppl_prolog_common.defs.hh b/interfaces/Prolog/ppl_prolog_common.defs.hh index 33af32d..bb3e245 100644 --- a/interfaces/Prolog/ppl_prolog_common.defs.hh +++ b/interfaces/Prolog/ppl_prolog_common.defs.hh @@ -513,6 +513,9 @@ handle_exception(const deterministic_timeout_exception&); catch (const std::exception& e) { \ handle_exception(e); \ } \ + catch (const std::logic_error& e) { \ + handle_exception(e); \ + } \ catch (...) { \ handle_exception(); \ } \