From 05746d24aa4ea589d0955029fd0534a8c55f028c Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 2 Nov 2022 10:02:36 -0600 Subject: [PATCH] Per #2277, more consistent formatting of -> in the error messages. --- src/basic/vx_config/config_util.cc | 6 +++--- src/libcode/vx_data2d_factory/data2d_factory.cc | 2 +- src/libcode/vx_data2d_factory/var_info_factory.cc | 2 +- src/tools/other/ascii2nc/ascii2nc.cc | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/basic/vx_config/config_util.cc b/src/basic/vx_config/config_util.cc index b9b48a1931..7306429e29 100644 --- a/src/basic/vx_config/config_util.cc +++ b/src/basic/vx_config/config_util.cc @@ -3127,10 +3127,10 @@ NormalizeType parse_conf_normalize(Dictionary *dict) { /////////////////////////////////////////////////////////////////////////////// void python_compile_error(const char *caller) { - ConcatString cs; - if(caller) cs << caller << " -> "; - mlog << Error << "\n" << cs + const char *method_name = (0 != caller) ? caller : "python_compile_error() -> "; + + mlog << Error << "\n" << method_name << "Support for Python has not been compiled!\n" << "To run Python scripts, recompile with the --enable-python option.\n\n"; diff --git a/src/libcode/vx_data2d_factory/data2d_factory.cc b/src/libcode/vx_data2d_factory/data2d_factory.cc index 28d0d355ea..719a249b4f 100644 --- a/src/libcode/vx_data2d_factory/data2d_factory.cc +++ b/src/libcode/vx_data2d_factory/data2d_factory.cc @@ -104,7 +104,7 @@ MetPythonDataFile * p = 0; case FileType_Python_Numpy: case FileType_Python_Xarray: - python_compile_error("Met2dDataFileFactory::new_met_2d_data_file()"); + python_compile_error("Met2dDataFileFactory::new_met_2d_data_file() -> "); #endif diff --git a/src/libcode/vx_data2d_factory/var_info_factory.cc b/src/libcode/vx_data2d_factory/var_info_factory.cc index 324f2a88f4..bdcee5a618 100644 --- a/src/libcode/vx_data2d_factory/var_info_factory.cc +++ b/src/libcode/vx_data2d_factory/var_info_factory.cc @@ -96,7 +96,7 @@ VarInfo * VarInfoFactory::new_var_info(GrdFileType type) p = 0; break; #else - python_compile_error("VarInfoFactory::new_var_info()"); + python_compile_error("VarInfoFactory::new_var_info() -> "); #endif case FileType_NcCF: diff --git a/src/tools/other/ascii2nc/ascii2nc.cc b/src/tools/other/ascii2nc/ascii2nc.cc index f00e826c90..3ebd547f1a 100644 --- a/src/tools/other/ascii2nc/ascii2nc.cc +++ b/src/tools/other/ascii2nc/ascii2nc.cc @@ -602,7 +602,7 @@ void set_format(const StringArray & a) { } #endif else if("python" == a[0]) { - python_compile_error("set_format()"); + python_compile_error("set_format() -> "); } else { mlog << Error << "\nset_format() -> "