Changeset 3eb7bf2 in sasview
- Timestamp:
- Aug 2, 2017 5:48:29 AM (7 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f26b7c1
- Parents:
- 2a52b0e
- Location:
- src/sas/sascalc/dataloader
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/loader.py
r8dec7e7 r3eb7bf2 74 74 pass # try the ASCII reader 75 75 except FileContentsException as fc_exc: 76 raise RuntimeError(fc_exc.message) 76 # File has an associated reader but it failed 77 raise RuntimeError(fc_exc) 77 78 except Exception: 78 79 pass 80 81 # File has no associated reader - try the ASCII reader 79 82 try: 80 83 ascii_loader = ascii_reader.Reader() … … 83 86 pass # Loader specific error to try the cansas XML reader 84 87 except FileContentsException as e: 85 # TODO: handle error86 88 raise RuntimeError(e) 89 90 # ASCII reader failed - try CanSAS xML reader 87 91 try: 88 92 cansas_loader = cansas_reader.Reader() 89 93 return cansas_loader.read(path) 90 94 except DefaultReaderException: 91 pass # Loader specific error to try the cansas NeXuS reader95 pass # Loader specific error to try the NXcanSAS reader 92 96 except FileContentsException as e: 93 # TODO: Handle errors properly94 97 raise RuntimeError(e) 95 98 except Exception as csr: 96 # TODO: Modify cansas reader to throw DefaultReaderException97 99 pass 100 101 # CanSAS XML reader failed - try NXcanSAS reader 98 102 try: 99 103 cansas_nexus_loader = cansas_reader_HDF5.Reader() … … 104 108 msg = "\n\tUnknown data format: %s.\n\tThe file is not a " % path 105 109 msg += "known format that can be loaded by SasView.\n" 106 raise NoKnownLoaderException , msg110 raise NoKnownLoaderException(msg) 107 111 except FileContentsException as e: 108 # TODO: Handle error(s) properly109 112 raise RuntimeError(e) 110 113
Note: See TracChangeset
for help on using the changeset viewer.