Ticket #9248 (closed: fixed)
Improve error message returned by LoadNexusMonitors
Reported by: | Anders Markvardsen | Owned by: | Federico M Pouzols |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Dan Nixon |
Description
At present if LoadNexusMonitors is used to load a ISIS histogram nexus file, as e.g. AutoTestData/LOQ48127.nxs the error message is:
Error in execution of algorithm LoadNexusMonitors: All arguments to init must be positive and non-zero
If trying to load a ISIS .raw file, e.g
isis\inst$\NDXHRPD\Instrument\data\cycle_13_5\HRP58608.raw, the error message is:
Error in execution of algorithm LoadNexusMonitors: NXopen(isis/inst$/NDXHRPD/Instrument/data/cycle_13_5/HRP58608.raw, 1) failed
The algorithm currently only support loading of SNS or ISIS event raw Nexus files. Hence there could be a check to see if this is satisfied if not return a message along the lines of "blah blah file is not readable by LoadNexusMonitors"
Change History
comment:1 Changed 6 years ago by Federico M Pouzols
- Status changed from new to assigned
- Owner set to Federico M Pouzols
comment:2 Changed 6 years ago by Federico Montesino Pouzols
- Status changed from assigned to inprogress
better error msgs, new check canOpenAsNeXus, re #9248
Changeset: 03df3451a8344a6d546b150a88bd51912d241234
comment:3 Changed 6 years ago by Federico Montesino Pouzols
fix doxygen tag, re #9248
Changeset: e99c1d26e670aafc7aa1cf0fa628c19bef74a00c
comment:4 Changed 6 years ago by Federico Montesino Pouzols
fix doxygen tag, re #9248
Changeset: dec6ba662c784405dd883270fa27225a62b945ec
comment:5 Changed 6 years ago by Federico M Pouzols
- Status changed from inprogress to verify
- Resolution set to fixed
- Milestone changed from Backlog to Release 3.3
LoadNexusMonitors will now give a more understantable error message when the file cannot be opened as a NeXus file, something like "Failed to recognize this file as a NeXus file, cannot continue", or "Not loading event data. Trying to load histogram data but failed to find monitors with histogram data or could not interpret the data. This file may be corrupted or it may not be supported"
Note also that the behavior of LoadNexusMonitors is being modified in #8990, with an additional option and other error condition checks. There's also some maintenance work planned for this and related algorithms: #10619.
To test:
Run commands (or use File->Open) like for example these ones:
LoadNexusMonitors('AutoTestData/LOQ48127.nxs', OutputWorkspace='foo') LoadNexusMonitors('any_random_file_that_is_definitely_not_nexus', OutputWorkspace='bar') LoadNexusMonitors('HRP58608.raw', OutputWorkspace='baz')
Check that you get understandable error messages. For files that are fine there should be no change in behavior. Tests should pass.
comment:6 Changed 6 years ago by Dan Nixon
- Status changed from verify to verifying
- Tester set to Dan Nixon
comment:7 Changed 6 years ago by Dan Nixon
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/9248_better_error_msgs_LoadNexusMonitors'
Full changeset: 95a62676ff04598d039a3b6789ed950ecd3e6b8f