diff --git a/Framework/DataHandling/src/LoadNexusLogs.cpp b/Framework/DataHandling/src/LoadNexusLogs.cpp index 78de9b18dff880ddfa7557f661ef5ba08517d890..b41fe714454fe36f3e5fe041bdd25cc03a427fd0 100644 --- a/Framework/DataHandling/src/LoadNexusLogs.cpp +++ b/Framework/DataHandling/src/LoadNexusLogs.cpp @@ -541,7 +541,7 @@ void LoadNexusLogs::loadSELog( } logValue = createTimeSeries(file, propName); file.closeGroup(); - } catch (::NeXus::Exception &e) { + } catch (std::exception &e) { g_log.warning() << "IXseblock entry '" << entry_name << "' gave an error when loading " << "a time series:'" << e.what() << "'. Skipping entry\n"; diff --git a/Framework/DataHandling/test/LoadNexusLogsTest.h b/Framework/DataHandling/test/LoadNexusLogsTest.h index f5d34c44940af420ce2427776e5d770392258ea1..0fe697a9e61ed28a2aeaeecf90c8cac0ada72116 100644 --- a/Framework/DataHandling/test/LoadNexusLogsTest.h +++ b/Framework/DataHandling/test/LoadNexusLogsTest.h @@ -261,6 +261,16 @@ public: TS_ASSERT(pclog->getStatistics().duration < 3e9); } + void test_no_crash_on_2D_array_of_values_on_load() { + auto testWS = createTestWorkspace(); + LoadNexusLogs loader; + loader.setChild(true); + loader.initialize(); + loader.setProperty("Workspace", testWS); + loader.setPropertyValue("Filename", "larmor_array_time_series_mock.nxs"); + TS_ASSERT_THROWS_NOTHING(loader.execute()) + } + private: API::MatrixWorkspace_sptr createTestWorkspace() { return WorkspaceFactory::Instance().create("Workspace2D", 1, 1, 1); diff --git a/Testing/Data/UnitTest/larmor_array_time_series_mock.nxs.md5 b/Testing/Data/UnitTest/larmor_array_time_series_mock.nxs.md5 new file mode 100644 index 0000000000000000000000000000000000000000..a7ea61d3d966df7906a444500ee0bdfecd1551f1 --- /dev/null +++ b/Testing/Data/UnitTest/larmor_array_time_series_mock.nxs.md5 @@ -0,0 +1 @@ +b67a8e67666425af5cd81b63dc324d46 diff --git a/docs/source/release/v3.14.0/framework.rst b/docs/source/release/v3.14.0/framework.rst index 2e38b727d875632f8c257548cad24e3a01786d9e..4a8dd6e9698149a00f3381485b782f7e7d725746 100644 --- a/docs/source/release/v3.14.0/framework.rst +++ b/docs/source/release/v3.14.0/framework.rst @@ -56,6 +56,7 @@ Improvements - :ref:`LoadSampleShape <algm-LoadSampleShape-v1>` now supports loading from binary .stl files. - :ref:`MaskDetectorsIf <algm-MaskDetectorsIf>` now supports masking a workspace in addition to writing the masking information to a calfile. - :ref:`LoadSampleShape <algm-LoadSampleShape-v1>` now supports loading from binary .stl files. +- :ref:`LoadNexusLogs <algm-LoadNexusLogs-v1>` now will load files that have 1D arrays for each time value in the logs, but will not load this data. Bugfixes ########