Report invalid manifest entries
This commit is contained in:
parent
e70f46afff
commit
43c3240d1f
2 changed files with 13 additions and 15 deletions
|
|
@ -2,7 +2,6 @@
|
|||
<?xml-stylesheet type="text/xsl" href="/versions/pcjs/1.21.4/manifest.xsl"?>
|
||||
<manifest type="software">
|
||||
<title>Microsoft Windows 1.01</title>
|
||||
<machine href="/devices/pc/machine/5160/ega/640kb/win101/machine.xml"/>
|
||||
<disk id="disk01" size="368640" chs="40:2:9" dir="archive/01-SETUP/" href="/disks/pc/windows/1.01/WIN101-DISK1-SETUP.json" md5="f82a9804ea9baab98f0d1fe9bf639637" md5json="6fd1f1762e78830e27f44e3e9386ae55">
|
||||
<name>Windows 1.01 (SETUP)</name>
|
||||
<file size="13008" time="1985-11-15 05:43:02" attr="0x20" md5="448755ac06a2d21ef62f5967a3a5d8e5">CGA.DRV</file>
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ HTMLOut.logError = function(err, fForce)
|
|||
{
|
||||
var sError = "";
|
||||
if (err) {
|
||||
sError = "htmlout error: " + err.message;
|
||||
sError = "HTMLOut error: " + err.message;
|
||||
if (fConsole || fForce) HTMLOut.logConsole(sError);
|
||||
}
|
||||
return sError;
|
||||
|
|
@ -1459,6 +1459,15 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If we were called from getManifestXML(), then let's fallback to getMarkdownFile() instead.
|
||||
*/
|
||||
if (fFromManifest) {
|
||||
s = sIndent + "<p>" + HTMLOut.logError(err) + " (invalid manifest entry)</p>";
|
||||
obj.getMarkdownFile(obj.sFile, sToken, sIndent, aParms, s);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we're still here, one of the following happened:
|
||||
*
|
||||
|
|
@ -1468,23 +1477,13 @@ HTMLOut.prototype.getMachineXML = function(sToken, sIndent, aParms, sXMLFile, sS
|
|||
*
|
||||
* But, instead of displaying a cryptic error message inside our beautiful HTML template, eg:
|
||||
*
|
||||
* htmlout error: ENOENT, open '/Users/Jeff/Sites/pcjs/devices/pc/machine/5160/cga/256kb/win101/debugger/machine.xml'
|
||||
* HTMLOut error: ENOENT, open '/Users/Jeff/Sites/pcjs/devices/pc/machine/5160/cga/256kb/win101/debugger/machine.xml'
|
||||
*
|
||||
* we have one more fallback: a random string! Less useful, but more entertaining. Well, maybe not even that.
|
||||
*
|
||||
* s = HTMLOut.logError(err);
|
||||
*/
|
||||
|
||||
/*
|
||||
* If we were called from getManifestXML(), then let's fallback to getMarkdownFile() instead.
|
||||
*/
|
||||
s = obj.getRandomString(sIndent);
|
||||
if (fFromManifest) {
|
||||
obj.getMarkdownFile(obj.sFile, sToken, sIndent, aParms, s);
|
||||
return;
|
||||
}
|
||||
|
||||
obj.aTokens[sToken] = s;
|
||||
obj.aTokens[sToken] = obj.getRandomString(sIndent);
|
||||
obj.replaceTokens();
|
||||
});
|
||||
};
|
||||
|
|
@ -1703,7 +1702,7 @@ HTMLOut.prototype.getMarkdownFile = function(sFile, sToken, sIndent, aParms, sPr
|
|||
/*
|
||||
* Instead of displaying a cryptic error message inside our beautiful HTML template, eg:
|
||||
*
|
||||
* htmlout error: ENOENT, open '/Users/Jeff/Sites/pcjs/devices/pc/machine/5160/cga/256kb/win101/debugger/README.md'
|
||||
* HTMLOut error: ENOENT, open '/Users/Jeff/Sites/pcjs/devices/pc/machine/5160/cga/256kb/win101/debugger/README.md'
|
||||
*
|
||||
* which is all this will give us:
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue