Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(xmlupload): print reason of error if a resource cannot be created…
…, remodel BaseError (DEV-1977) (#349) If a single resource cannot be created, but the xmlupload continues, the reason of the error could (until now) only be found in the log file. From the terminal output alone, the user doesn't know what's wrong with his XML file. From now on, more information is printed to the terminal. Old output: ``` >>> dsp-tools xmlupload data.xml (...) Created resource 47/50: 'Annotation to TestthingOhnePermissions' (ID: 'annotation_1', IRI: 'http://rdfh.ch/4123/6lqOzlhMQkSlJeYNKjPHJw') WARNING: Unable to create resource 'First Testthing' (test_thing_1). Created resource 49/50: 'Second Testthing' (ID: 'test_thing_2', IRI: 'http://rdfh.ch/4123/_OLrsCnaQ3STDsfYLolSoA') Created resource 50/50: 'Link between 'Second Testthing', 'Compoundthing' and 'Partofthing-1'' (ID: 'link_obj_1', IRI: 'http://rdfh.ch/4123/wVSAp0yIRUe2H__J6D4hSA') Upload the stashed XML texts... Upload XML text(s) of resource "test_thing_2"... WARNING: Unable to upload the xml text of "testonto:hasRichtext" of resource "test_thing_2" ``` New output: ``` >>> dsp-tools xmlupload data.xml (...) Created resource 47/50: 'Annotation to TestthingOhnePermissions' (ID: 'annotation_1', IRI: 'http://rdfh.ch/4123/I9r3uZ3wSfOoK7pMzVdOug') WARNING: Unable to create resource 'First Testthing' (test_thing_1): String does not represent integer number! "hello" Created resource 49/50: 'Second Testthing' (ID: 'test_thing_2', IRI: 'http://rdfh.ch/4123/m8mZN3D7R4y-1xIlKSjbTA') Created resource 50/50: 'Link between 'Second Testthing', 'Compoundthing' and 'Partofthing-1'' (ID: 'link_obj_1', IRI: 'http://rdfh.ch/4123/YfV51TQ8QJqBG5ZaKTRzvg') Upload the stashed XML texts... Upload XML text(s) of resource "test_thing_2"... WARNING: Unable to upload the xml text of "testonto:hasRichtext" of resource "test_thing_2". Original error message: Invalid standoff resource reference: IRI:test_thing_1:IRI ```
- Loading branch information
Showing
6 changed files
with
154 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.