summaryrefslogtreecommitdiff
path: root/src/dgxmlparser.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-06-20 19:21:48 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-12 11:11:45 +0200
commit6adb14a7027c8d54827093c83fc80694d71fb6a7 (patch)
treecc02ac1bdb548b0b317999d727a12fa5a9973594 /src/dgxmlparser.cc
parent1560674582102cd83197dccc79cb029fc843a48e (diff)
Fix missing finalization of instruments on load. Fix relative instrument filenames according to the drumkit file. Make drumkit creator create version 2.0 drumkits. Reduce missing refs file to a warning.
Diffstat (limited to 'src/dgxmlparser.cc')
-rw-r--r--src/dgxmlparser.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dgxmlparser.cc b/src/dgxmlparser.cc
index 3fdedc2..8fdcec4 100644
--- a/src/dgxmlparser.cc
+++ b/src/dgxmlparser.cc
@@ -105,9 +105,10 @@ bool parseDrumkitFile(const std::string& filename, DrumkitDOM& dom)
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file(filename.c_str());
res &= !result.status;
-
- if(!res) {
- printf("PugiXml error %d\n", (int) result.offset);
+ if(!res)
+ {
+ ERR(dgxmlparser, "XML parse error: '%s' %d", filename.data(),
+ (int) result.offset);
return false;
}
@@ -156,6 +157,10 @@ bool parseInstrumentFile(const std::string& filename, InstrumentDOM& dom)
pugi::xml_document doc;
pugi::xml_parse_result result = doc.load_file(filename.data());
res &= !result.status;
+ if(!res)
+ {
+ ERR(dgxmlparser, "XML parse error: '%s'", filename.data());
+ }
//TODO: handle version
pugi::xml_node instrument = doc.child("instrument");