adapt-authoring-adaptframework 1.9.6 → 1.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -446,7 +446,15 @@ class AdaptFrameworkImport {
|
|
|
446
446
|
* @return {Promise}
|
|
447
447
|
*/
|
|
448
448
|
async loadContentFile (filePath) {
|
|
449
|
-
|
|
449
|
+
let contents
|
|
450
|
+
try {
|
|
451
|
+
contents = await FWUtils.readJson(filePath)
|
|
452
|
+
} catch (e) {
|
|
453
|
+
if (e.constructor.name === 'SyntaxError') {
|
|
454
|
+
throw App.instance.errors.FILE_SYNTAX_ERROR.setData({ path: filePath.replace(this.path, ''), message: e.message })
|
|
455
|
+
}
|
|
456
|
+
throw e
|
|
457
|
+
}
|
|
450
458
|
if (contents._type === 'course') {
|
|
451
459
|
this.contentJson.course = contents
|
|
452
460
|
return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapt-authoring-adaptframework",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.7",
|
|
4
4
|
"description": "Adapt framework integration for the Adapt authoring tool",
|
|
5
5
|
"homepage": "https://github.com/adapt-security/adapt-authoring-adaptframework",
|
|
6
6
|
"license": "GPL-3.0",
|