summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2026-03-28 23:05:15 +0100
committerCarl Hetherington <cth@carlh.net>2026-04-01 23:43:00 +0200
commite144eafe81f5c7ef51d3c4078a08e69b4e9a79e7 (patch)
treea12c829770a49b9cd1d2764b50d1dbca1d1cdb65 /src
parent2105b40ff1841be7e4c33d5131e20ef5c086350b (diff)
INVALID_XML: note -> error.
Diffstat (limited to 'src')
-rw-r--r--src/verify.cc11
-rw-r--r--src/verify.h9
2 files changed, 14 insertions, 6 deletions
diff --git a/src/verify.cc b/src/verify.cc
index d3f41221..0b80b460 100644
--- a/src/verify.cc
+++ b/src/verify.cc
@@ -370,10 +370,11 @@ validate_xml(Context& context, T xml)
for (auto i: error_handler.errors()) {
context.add_note(
- VerificationNote::Code::INVALID_XML,
- i.message(),
- boost::trim_copy(i.public_id() + " " + i.system_id()),
- i.line()
+ VerificationNote(
+ VerificationNote::Code::INVALID_XML,
+ boost::filesystem::path(boost::trim_copy(i.public_id() + " " + i.system_id())),
+ i.line()
+ ).set_error(i.message())
);
}
}
@@ -1981,7 +1982,7 @@ dcp::note_to_string(VerificationNote note, function<string (string)> process_str
case VerificationNote::Code::MISMATCHED_STANDARD:
return process_string("The DCP contains both SMPTE and Interop parts.");
case VerificationNote::Code::INVALID_XML:
- return compose("An XML file is badly formed: %1 (%2:%3)", note.note().get(), filename(), note.line().get());
+ return compose("An XML file is badly formed: %1 (%2:%3)", *note.error(), filename(), note.line().get());
case VerificationNote::Code::MISSING_ASSETMAP:
return process_string("No valid ASSETMAP or ASSETMAP.xml was found.");
case VerificationNote::Code::INVALID_INTRINSIC_DURATION:
diff --git a/src/verify.h b/src/verify.h
index ab7cd34b..515bbed5 100644
--- a/src/verify.h
+++ b/src/verify.h
@@ -157,7 +157,7 @@ public:
/** The DCP contains both SMPTE and Interop-standard components */
MISMATCHED_STANDARD,
/** Some XML fails to validate against its XSD/DTD
- * note contains the (probably technical) details
+ * error contains the (probably technical) details
* file contains the invalid filename
* line contains the line number
* reel_index contains the reel index (starting from 0), if applicable
@@ -604,6 +604,13 @@ public:
_data[Data::FILE] = file;
}
+ VerificationNote(Code code, boost::filesystem::path file, uint64_t line)
+ : _code (code)
+ {
+ _data[Data::FILE] = file;
+ _data[Data::LINE] = line;
+ }
+
VerificationNote(Code code, std::string note, boost::filesystem::path file, uint64_t line)
: _code (code)
{