Changeset 3a81cd9 in sasview for src/sas


Ignore:
Timestamp:
Aug 2, 2017 6:59:11 AM (7 years ago)
Author:
lewis
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:
4dd90bf
Parents:
f994e8b1
Message:

Ensure error messages are displayed correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/loader.py

    r3eb7bf2 r3a81cd9  
    7575        except FileContentsException as fc_exc: 
    7676            # File has an associated reader but it failed 
    77             raise RuntimeError(fc_exc) 
     77            raise RuntimeError(fc_exc.message) 
    7878        except Exception: 
    7979            pass 
     
    8686            pass  # Loader specific error to try the cansas XML reader 
    8787        except FileContentsException as e: 
    88             raise RuntimeError(e) 
     88            raise RuntimeError(e.message) 
    8989 
    9090        # ASCII reader failed - try CanSAS xML reader 
     
    9595            pass  # Loader specific error to try the NXcanSAS reader 
    9696        except FileContentsException as e: 
    97             raise RuntimeError(e) 
     97            raise RuntimeError(e.message) 
    9898        except Exception as csr: 
    9999            pass 
     
    110110            raise NoKnownLoaderException(msg) 
    111111        except FileContentsException as e: 
    112             raise RuntimeError(e) 
     112            raise RuntimeError(e.message) 
    113113 
    114114    def find_plugins(self, dir): 
Note: See TracChangeset for help on using the changeset viewer.