JI-942 Add missing library error message
parent
c9e1ac9347
commit
f96d04cc27
|
@ -54,6 +54,12 @@ H5P.ContentUpgradeProcess = (function (Version) {
|
||||||
if (err) {
|
if (err) {
|
||||||
return done(err);
|
return done(err);
|
||||||
}
|
}
|
||||||
|
if (library.semantics === null) {
|
||||||
|
return done({
|
||||||
|
type: 'libraryMissing',
|
||||||
|
library: library.name + ' ' + library.version.major + '.' + library.version.minor
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Run upgrade routines on params
|
// Run upgrade routines on params
|
||||||
self.processParams(library, oldVersion, newVersion, params, metadata, function (err, params, metadata) {
|
self.processParams(library, oldVersion, newVersion, params, metadata, function (err, params, metadata) {
|
||||||
|
|
|
@ -422,6 +422,10 @@
|
||||||
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorParamsBroken;
|
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorParamsBroken;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'libraryMissing':
|
||||||
|
error = info.errorLibrary.replace('%lib', error.library);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'scriptMissing':
|
case 'scriptMissing':
|
||||||
error = info.errorScript.replace('%lib', error.library);
|
error = info.errorScript.replace('%lib', error.library);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue