Index: src/sas/sascalc/dataloader/readers/anton_paar_saxs_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/anton_paar_saxs_reader.py	(revision a235f71571822c52f74fd1221fcd542805cf1277)
+++ src/sas/sascalc/dataloader/readers/anton_paar_saxs_reader.py	(revision fafe52a82bebe8d8a20bfb820388c964aa3c4b7b)
@@ -9,17 +9,11 @@
 
 from sas.sascalc.dataloader.readers.xml_reader import XMLreader
-from sas.sascalc.dataloader.data_info import plottable_1D, Data1D, Sample, Source
+from sas.sascalc.dataloader.data_info import plottable_1D, Data1D, DataInfo, Sample, Source
 from sas.sascalc.dataloader.data_info import Process, Aperture, Collimation, TransmissionSpectrum, Detector
-
+from sas.sascalc.dataloader.loader_exceptions import FileContentsException, DataReaderException
 
 class Reader(XMLreader):
     """
-    A class for reading in CanSAS v2.0 data files. The existing iteration opens Mantid generated HDF5 formatted files
-    with file extension .h5/.H5. Any number of data sets may be present within the file and any dimensionality of data
-    may be used. Currently 1D and 2D SAS data sets are supported, but future implementations will include 1D and 2D
-    SESANS data. This class assumes a single data set for each sasentry.
-
-    :Dependencies:
-        The CanSAS HDF5 reader requires h5py v2.5.0 or later.
+    A class for reading in Anton Paar .pdh files
     """
 
@@ -30,6 +24,4 @@
     ## Raw file contents to be processed
     raw_data = None
-    ## Data set being modified
-    current_dataset = None
     ## For recursion and saving purposes, remember parent objects
     parent_list = None
@@ -42,10 +34,8 @@
     ## Flag to bypass extension check
     allow_all = False
-    ## List of files to return
-    output = None
 
     def reset_state(self):
-        self.current_dataset = Data1D(np.empty(0), np.empty(0),
-                                            np.empty(0), np.empty(0))
+        self.current_dataset = plottable_1D(np.empty(0), np.empty(0), np.empty(0), np.empty(0))
+        self.current_datainfo = DataInfo()
         self.datasets = []
         self.raw_data = None
@@ -63,5 +53,5 @@
         self.lower = 5
 
-    def read(self, filename):
+    def get_file_contents(self):
         """
             This is the general read method that all SasView data_loaders must have.
@@ -73,63 +63,70 @@
         ## Reinitialize the class when loading a new data file to reset all class variables
         self.reset_state()
-        ## Check that the file exists
-        if os.path.isfile(filename):
-            basename = os.path.basename(filename)
-            _, extension = os.path.splitext(basename)
-            # If the file type is not allowed, return empty list
-            if extension in self.ext or self.allow_all:
-                ## Load the data file
-                input_f = open(filename, 'r')
-                buff = input_f.read()
-                self.raw_data = buff.splitlines()
-                self.read_data()
-        return self.output
+        buff = self.f_open.read()
+        self.raw_data = buff.splitlines()
+        self.read_data()
 
     def read_data(self):
+        correctly_loaded = True
+        error_message = ""
+
         q_unit = "1/nm"
         i_unit = "1/um^2"
-        self.current_dataset.title = self.raw_data[0]
-        self.current_dataset.meta_data["Keywords"] = self.raw_data[1]
-        line3 = self.raw_data[2].split()
-        line4 = self.raw_data[3].split()
-        line5 = self.raw_data[4].split()
-        self.data_points = int(line3[0])
-        self.lower = 5
-        self.upper = self.lower + self.data_points
-        self.source.radiation = 'x-ray'
-        normal = float(line4[3])
-        self.current_dataset.source.radiation = "x-ray"
-        self.current_dataset.source.name = "Anton Paar SAXSess Instrument"
-        self.current_dataset.source.wavelength = float(line4[4])
-        xvals = []
-        yvals = []
-        dyvals = []
-        for i in range(self.lower, self.upper):
-            index = i - self.lower
-            data = self.raw_data[i].split()
-            xvals.insert(index, normal * float(data[0]))
-            yvals.insert(index, normal * float(data[1]))
-            dyvals.insert(index, normal * float(data[2]))
+        try:
+            self.current_datainfo.title = self.raw_data[0]
+            self.current_datainfo.meta_data["Keywords"] = self.raw_data[1]
+            line3 = self.raw_data[2].split()
+            line4 = self.raw_data[3].split()
+            line5 = self.raw_data[4].split()
+            self.data_points = int(line3[0])
+            self.lower = 5
+            self.upper = self.lower + self.data_points
+            self.source.radiation = 'x-ray'
+            normal = float(line4[3])
+            self.current_datainfo.source.radiation = "x-ray"
+            self.current_datainfo.source.name = "Anton Paar SAXSess Instrument"
+            self.current_datainfo.source.wavelength = float(line4[4])
+            xvals = []
+            yvals = []
+            dyvals = []
+            for i in range(self.lower, self.upper):
+                index = i - self.lower
+                data = self.raw_data[i].split()
+                xvals.insert(index, normal * float(data[0]))
+                yvals.insert(index, normal * float(data[1]))
+                dyvals.insert(index, normal * float(data[2]))
+        except Exception as e:
+            error_message = "Couldn't load {}.\n".format(self.f_open.name)
+            error_message += e.message
+            raise FileContentsException(error_message)
         self.current_dataset.x = np.append(self.current_dataset.x, xvals)
         self.current_dataset.y = np.append(self.current_dataset.y, yvals)
         self.current_dataset.dy = np.append(self.current_dataset.dy, dyvals)
         if self.data_points != self.current_dataset.x.size:
-            self.errors.add("Not all data was loaded properly.")
-        if self.current_dataset.dx.size != self.current_dataset.x.size:
-            dxvals = np.zeros(self.current_dataset.x.size)
-            self.current_dataset.dx = dxvals
+            error_message += "Not all data points could be loaded.\n"
+            correctly_loaded = False
         if self.current_dataset.x.size != self.current_dataset.y.size:
-            self.errors.add("The x and y data sets are not the same size.")
+            error_message += "The x and y data sets are not the same size.\n"
+            correctly_loaded = False
         if self.current_dataset.y.size != self.current_dataset.dy.size:
-            self.errors.add("The y and dy datasets are not the same size.")
-        self.current_dataset.errors = self.errors
+            error_message += "The y and dy datasets are not the same size.\n"
+            correctly_loaded = False
+
         self.current_dataset.xaxis("Q", q_unit)
         self.current_dataset.yaxis("Intensity", i_unit)
         xml_intermediate = self.raw_data[self.upper:]
         xml = ''.join(xml_intermediate)
-        self.set_xml_string(xml)
-        dom = self.xmlroot.xpath('/fileinfo')
-        self._parse_child(dom)
-        self.output.append(self.current_dataset)
+        try:
+            self.set_xml_string(xml)
+            dom = self.xmlroot.xpath('/fileinfo')
+            self._parse_child(dom)
+        except Exception as e:
+            # Data loaded but XML metadata has an error
+            error_message += "Data points have been loaded but there was an "
+            error_message += "error reading XML metadata: " + e.message
+            correctly_loaded = False
+        self.send_to_output()
+        if not correctly_loaded:
+            raise DataReaderException(error_message)
 
     def _parse_child(self, dom, parent=''):
@@ -146,14 +143,14 @@
                 self._parse_child(node, key)
                 if key == "SampleDetector":
-                    self.current_dataset.detector.append(self.detector)
+                    self.current_datainfo.detector.append(self.detector)
                     self.detector = Detector()
             else:
                 if key == "value":
                     if parent == "Wavelength":
-                        self.current_dataset.source.wavelength = value
+                        self.current_datainfo.source.wavelength = value
                     elif parent == "SampleDetector":
                         self.detector.distance = value
                     elif parent == "Temperature":
-                        self.current_dataset.sample.temperature = value
+                        self.current_datainfo.sample.temperature = value
                     elif parent == "CounterSlitLength":
                         self.detector.slit_length = value
@@ -161,5 +158,5 @@
                     value = value.replace("_", "")
                     if parent == "Wavelength":
-                        self.current_dataset.source.wavelength_unit = value
+                        self.current_datainfo.source.wavelength_unit = value
                     elif parent == "SampleDetector":
                         self.detector.distance_unit = value
@@ -169,5 +166,5 @@
                         self.current_dataset.yaxis(self.current_dataset._yaxis, value)
                     elif parent == "Temperature":
-                        self.current_dataset.sample.temperature_unit = value
+                        self.current_datainfo.sample.temperature_unit = value
                     elif parent == "CounterSlitLength":
                         self.detector.slit_length_unit = value
Index: src/sas/sascalc/dataloader/readers/xml_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/xml_reader.py	(revision bc570f45b03f498ea0642bd94b7297d55c9237d9)
+++ src/sas/sascalc/dataloader/readers/xml_reader.py	(revision fafe52a82bebe8d8a20bfb820388c964aa3c4b7b)
@@ -93,8 +93,10 @@
         except etree.XMLSyntaxError as xml_error:
             logger.info(xml_error)
-        except Exception:
+            raise xml_error
+        except Exception as exc:
             self.xml = None
             self.xmldoc = None
             self.xmlroot = None
+            raise exc
 
     def set_schema(self, schema):
Index: src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision 9df816b9add5c2bece6e940e4bc97c1b6c87af56)
+++ src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py	(revision fafe52a82bebe8d8a20bfb820388c964aa3c4b7b)
@@ -230,5 +230,4 @@
 
             except Exception as e:
-                import pdb; pdb.set_trace()
                 exception_occurred = True
                 logger.error(e.message)
@@ -239,5 +238,5 @@
                 file_err += "When contacting the SasView team, mention the"
                 file_err += " following:\n"
-                file_err += "Error: " + e.message
+                file_err += e.message
                 file_errors[basename] = [file_err]
 
