Ticket #10722 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Improve error message returned by LoadAscii (and maybe other Load...)

Reported by: Federico M Pouzols Owned by: Federico M Pouzols
Priority: minor Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

This ticket is very similar to #9248 (which was about LoadNexusMonitors).

If you try to load for example UsageData/ls5637.mat you'll get a cryptic log message:

Error in execution of algorithm LoadAscii:
All arguments to init must be positive and non-zero

This can be very misleading to users. It would be very simple to provide a more informative error message to avoid confusion. Check also what happens with other Load... algorithms.

Change History

comment:1 Changed 6 years ago by Federico Montesino Pouzols

add exception catches and better error msgs, re #10722

Changeset: 59f3b733fc51c7e87e1afa565585e3f024b4e9b2

comment:2 Changed 6 years ago by Federico M Pouzols

  • Status changed from new to assigned

comment:3 Changed 6 years ago by Federico M Pouzols

  • Status changed from assigned to inprogress

comment:4 Changed 6 years ago by Federico M Pouzols

  • Status changed from inprogress to verify
  • Resolution set to fixed

This just adds a few checks and more informative error messages if the file cannot be loaded.

I checked other load algorithms for common formats, like loadAscii, loadNexus, etc. and apparently all of them come with at least some basic checks and error messages.

To test: use LoadAscii to load files that are definitely not ascii, or that could be interpreted as ascii/text files but are not in the correct format. Check that you get a more informative error message now. Tests should pass.

comment:5 Changed 6 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:6 Changed 6 years ago by Federico Montesino Pouzols

Fix typo after merge conflict fixes, re #10722

Changeset: db247e43e50a7cee85c4cbf7acd5bd21aa938246

comment:7 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to reopened
  • Resolution fixed deleted

There are two places of conflicts as I merge branch into master. Please merge this branch with up-to-date master.

comment:8 Changed 6 years ago by Federico M Pouzols

  • Status changed from reopened to verify
  • Resolution set to fixed

Re-merged with master.

comment:9 Changed 6 years ago by Federico Montesino Pouzols

  • Status changed from verify to closed

Merge branch 'master' into feature/10722_better_errors_loadascii_and_others

Conflicts:

Code/Mantid/Framework/DataHandling/src/LoadAscii2.cpp

Sorting out conflicts in merge with master, no issue apparently

Full changeset: 723213cc02c53c028f2b9403d82c170feb95f685

comment:10 Changed 6 years ago by Wenduo Zhou

Merge remote-tracking branch 'origin/feature/10722_better_errors_loadascii_and_others'

Full changeset: 8684281dc9b05c71ed294d788ec71c223fdeb38a

comment:11 Changed 6 years ago by Wenduo Zhou

The error message is helpful. Ticket is then close.

comment:12 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:13 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11564

Note: See TracTickets for help on using tickets.