ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change
on this file since 270c882b was
270c882b,
checked in by krzywon, 7 years ago
|
Beginning implementation of exception handling within data loader.
|
-
Property mode set to
100644
|
File size:
836 bytes
|
Line | |
---|
1 | """ |
---|
2 | Exceptions specific to loading data. |
---|
3 | """ |
---|
4 | |
---|
5 | |
---|
6 | class NoKnownLoaderException(Exception): |
---|
7 | """ |
---|
8 | Exception for files with no associated reader based on the file |
---|
9 | extension of the loaded file. This exception should only be thrown by |
---|
10 | loader.py. |
---|
11 | """ |
---|
12 | def __init__(self, e): |
---|
13 | self.message = e |
---|
14 | |
---|
15 | |
---|
16 | class FileContentsException(Exception): |
---|
17 | """ |
---|
18 | Exception for files with an associated reader, but with no loadable data. |
---|
19 | This is useful for catching loader or file format issues. |
---|
20 | """ |
---|
21 | def __init__(self, e): |
---|
22 | self.message = e |
---|
23 | |
---|
24 | |
---|
25 | class DataReaderException(Exception): |
---|
26 | """ |
---|
27 | Exception for files that were able to mostly load, but had minor issues |
---|
28 | along the way. |
---|
29 | Any exceptions of this type should be put into the datainfo.errors |
---|
30 | """ |
---|
31 | def __init__(self, e): |
---|
32 | self.message = e |
---|
Note: See
TracBrowser
for help on using the repository browser.