# HG changeset patch # User Carnë Draug # Date 1372965025 -3600 # Node ID 55caca5268279d150b4ba1e3a715cf1f1fafe18f # Parent 5314734810844711df65a5aa8d333ac4205e3c46 New function to error due to disabled feature during build. * gripes.cc: add new function gripe_disabled_feature() to give an error due to a feature that disabled when building Octave or an Octave package, either optionally or due to a missing library. * gripes.h: define gripe_disabled_feature() as external function. diff -r 531473481084 -r 55caca526827 libinterp/corefcn/gripes.cc --- a/libinterp/corefcn/gripes.cc Thu Jul 04 20:33:02 2013 -0400 +++ b/libinterp/corefcn/gripes.cc Thu Jul 04 20:10:25 2013 +0100 @@ -236,3 +236,11 @@ warning_with_id ("Octave:matlab-incompatible", "potential Matlab compatibility problem: comparing complex numbers"); } + +void +gripe_disabled_feature (const std::string& func, const std::string& feature, + const std::string& pkg /*="Octave"*/) +{ + error ("%s: support for %s was disabled when %s was built", + func.c_str (), feature.c_str (), pkg.c_str ()); +} diff -r 531473481084 -r 55caca526827 libinterp/corefcn/gripes.h --- a/libinterp/corefcn/gripes.h Thu Jul 04 20:33:02 2013 -0400 +++ b/libinterp/corefcn/gripes.h Thu Jul 04 20:10:25 2013 +0100 @@ -127,4 +127,7 @@ extern OCTINTERP_API void gripe_warn_complex_cmp (void); +extern OCTINTERP_API void +gripe_disabled_feature (const std::string& func, const std::string& feature, + const std::string& pkg="Octave"); #endif