mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-20 22:16:52 +00:00
Add some error checking
This commit is contained in:
parent
db9978f8c2
commit
2e4980bb97
@ -57,6 +57,9 @@ function loadStore(store) {
|
||||
savePlugin = function(pluginFields,type,publisher,name) {
|
||||
const bagName = makePluginBagName(type,publisher,name);
|
||||
const result = store.createBag(bagName,pluginFields.description || "(no description)",{allowPrivilegedCharacters: true});
|
||||
if(result !== null) {
|
||||
throw `Error creating plugin bag ${bagname}`;
|
||||
}
|
||||
store.saveBagTiddler(pluginFields,bagName);
|
||||
},
|
||||
collectPlugins = function(folder,type,publisher) {
|
||||
@ -99,7 +102,10 @@ function loadStore(store) {
|
||||
}
|
||||
if(wikiInfo) {
|
||||
// Create the bag
|
||||
store.createBag(options.bagName,options.bagDescription);
|
||||
const result = store.createBag(options.bagName,options.bagDescription);
|
||||
if(!result) {
|
||||
throw `Error creating bag ${options.bagName} for edition ${options.wikiPath}`;
|
||||
}
|
||||
// Add plugins to the recipe list
|
||||
const recipeList = [];
|
||||
const processPlugins = function(type,plugins) {
|
||||
|
Loading…
Reference in New Issue
Block a user