JI-942 Add missing library error message
parent
c9e1ac9347
commit
f96d04cc27
|
@ -54,6 +54,12 @@ H5P.ContentUpgradeProcess = (function (Version) {
|
|||
if (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
|
||||
self.processParams(library, oldVersion, newVersion, params, metadata, function (err, params, metadata) {
|
||||
|
|
|
@ -422,6 +422,10 @@
|
|||
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorParamsBroken;
|
||||
break;
|
||||
|
||||
case 'libraryMissing':
|
||||
error = info.errorLibrary.replace('%lib', error.library);
|
||||
break;
|
||||
|
||||
case 'scriptMissing':
|
||||
error = info.errorScript.replace('%lib', error.library);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue