Project

General

Profile

« Previous | Next » 

Revision f883a3c8

Added by Patrick Plitzner about 9 years ago

  • error handling for report file

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/AbcdImportWizard.java
21 21

  
22 22
import eu.etaxonomy.cdm.database.DbSchemaValidation;
23 23
import eu.etaxonomy.cdm.io.specimen.abcd206.in.Abcd206ImportConfigurator;
24
import eu.etaxonomy.taxeditor.model.MessagingUtils;
24 25
import eu.etaxonomy.taxeditor.store.CdmStore;
26
import eu.etaxonomy.taxeditor.store.internal.TaxeditorStorePlugin;
25 27

  
26 28
/**
27 29
 * <p>AbcdImportWizard class.</p>
......
57 59
		try {
58 60
            configurator.setSource(new FileInputStream(new File(source)));
59 61
        } catch (FileNotFoundException e) {
62
            MessagingUtils.errorDialog("File not found.", this, "Import file was not found.", TaxeditorStorePlugin.PLUGIN_ID, e, false);
60 63
            logger.error("File not found!", e);
61 64
            return false;
62 65
        }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/io/wizard/ClassificationChooserWizardPage.java
165 165
    }
166 166

  
167 167
    public URI getReportUri(){
168
        return new File(textFileReport.getText()).toURI();
168
        String text = textFileReport.getText();
169
        if(text==null || text.isEmpty()){
170
            return null;
171
        }
172
        return new File(text).toURI();
169 173
    }
170 174
}

Also available in: Unified diff