Skip to content

Commit

Permalink
Better message
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno De Bel authored and Bruno De Bel committed Feb 14, 2018
1 parent 2c59271 commit c01af53
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions project/verifyBook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@ void verifyBook::check(int check,metsparserContext& context){

std::string title = buildTitle( context.inventory.inventoryMODSMD_PRINT);
if ( invent.title.compare(title)) {
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_PRINT", "Wrong title. Found '" + context.inventory.inventoryMODSMD_PRINT.title +"' but should be "+ invent.title ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.title);
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_PRINT", "Wrong title. Found '" + context.inventory.inventoryMODSMD_PRINT.title +"' but should be '"+ invent.title +"'",context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.title);
}

if ( invent.subtitle.compare(context.inventory.inventoryMODSMD_PRINT.subtitle)) {
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_PRINT", "Wrong subtitle. Found '" + context.inventory.inventoryMODSMD_PRINT.subtitle +"' but should be "+ invent.subtitle ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.title);
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_PRINT", "Wrong subtitle. Found '" + context.inventory.inventoryMODSMD_PRINT.subtitle +"' but should be '"+ invent.subtitle +"'" ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.title);
}

title = buildTitle( context.inventory.inventoryMODSMD_COLLECTION); // in the xml in title
if ( invent.titlecollection.compare(title)) {
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_COLLECTION", "Wrong title collection. Found '" + context.inventory.inventoryMODSMD_COLLECTION.title +"' but should be "+ invent.titlecollection ,context.currentMetsFile,context.inventory.inventoryMODSMD_COLLECTION.title);
hError -> getError(cat_bookinventoryTitle,"METS","DMDSEC MODSMD_COLLECTION", "Wrong title collection. Found '" + context.inventory.inventoryMODSMD_COLLECTION.title +"' but should be '"+ invent.titlecollection +"'",context.currentMetsFile,context.inventory.inventoryMODSMD_COLLECTION.title);
}

if ( invent.publisher.compare(context.inventory.inventoryMODSMD_PRINT.publisher)) {
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong publisher. Found '" + context.inventory.inventoryMODSMD_PRINT.publisher +"' but should be "+ invent.publisher ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.publisher);
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong publisher. Found '" + context.inventory.inventoryMODSMD_PRINT.publisher +"' but should be '"+ invent.publisher +"'",context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.publisher);
}

if ( invent.printer.compare(context.inventory.inventoryMODSMD_PRINT.printer)) {
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong printer. Found '" + context.inventory.inventoryMODSMD_PRINT.printer +"' but should be "+ invent.printer ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.printer);
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong printer. Found '" + context.inventory.inventoryMODSMD_PRINT.printer +"' but should be '"+ invent.printer +"'",context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.printer);
}


if ( invent.callnumber.compare(context.inventory.inventoryMODSMD_PRINT.callnumber)) {
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong callNumber. Found '" + context.inventory.inventoryMODSMD_PRINT.callnumber +"' but should be "+ invent.callnumber ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.callnumber);
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong callNumber. Found '" + context.inventory.inventoryMODSMD_PRINT.callnumber +"' but should be '"+ invent.callnumber +"'" ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.callnumber);
}


string partNumberBuild = buildPartNumber(invent.yearnumber,invent.issuenumber);
if ( partNumberBuild . compare(context.inventory.inventoryMODSMD_PRINT.partNumber)){
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong partNumber. Found '" + context.inventory.inventoryMODSMD_PRINT.partNumber +"' but should be "+ partNumberBuild ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.partNumber);
hError -> getError(cat_bookinventoryData,"METS","DMDSEC MODSMD_PRINT", "Wrong partNumber. Found '" + context.inventory.inventoryMODSMD_PRINT.partNumber +"' but should be '"+ partNumberBuild +"'" ,context.currentMetsFile,context.inventory.inventoryMODSMD_PRINT.partNumber);
}


Expand Down

0 comments on commit c01af53

Please sign in to comment.