Comparing version 0.1.9 to 0.1.10
@@ -68,2 +68,3 @@ //------------------------------------------------------------------------------- | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("No context loaded for '" + contextQuery + "'"); | ||
@@ -70,0 +71,0 @@ } |
@@ -126,5 +126,7 @@ //------------------------------------------------------------------------------- | ||
if (!bugPackKeyString) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Expected string for 'bugPackKeyString' instead found ", bugPackKeyString); | ||
} | ||
if (!bugPackExport) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Expected object or function for 'bugPackExport' instead found ", bugPackExport); | ||
@@ -170,2 +172,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Context already loaded")); | ||
@@ -185,2 +188,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Context already loaded"); | ||
@@ -201,2 +205,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Cannot find registry entry '" + bugPackKeyString + "'")); | ||
@@ -216,2 +221,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Cannot find registry entry '" + bugPackKeyString + "'"); | ||
@@ -248,2 +254,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("bugPackKeyStrings must be an Array")); | ||
@@ -264,2 +271,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("bugPackKeyStrings must be an Array"); | ||
@@ -279,2 +287,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Cannot find registry entry for source file '" + sourceFilePath + "'")); | ||
@@ -293,2 +302,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Cannot find registry entry for source file '" + sourceFilePath + "'"); | ||
@@ -325,2 +335,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("sourceFilePaths must be an Array")); | ||
@@ -341,2 +352,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("sourceFilePaths must be an Array"); | ||
@@ -366,2 +378,3 @@ } | ||
if (this.processingExportStack.indexOf(bugPackKeyString) !== -1) { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Circular dependency in load calls. Requiring '" + bugPackKeyString + "' which is already in the " + | ||
@@ -378,2 +391,3 @@ "load stack. " + JSON.stringify(this.processingExportStack))); | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Cannot find registry entry '" + bugPackKeyString + "'")); | ||
@@ -390,2 +404,3 @@ } | ||
if (this.processingExportStack.indexOf(bugPackKeyString) !== -1) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Circular dependency in load calls. Requiring '" + bugPackKeyString + "' which is already in the " + | ||
@@ -402,2 +417,3 @@ "load stack. " + JSON.stringify(this.processingExportStack)); | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Cannot find registry entry '" + bugPackKeyString + "'"); | ||
@@ -499,2 +515,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
callback(new Error("Cannot find bugpack-registry.json file")); | ||
@@ -518,2 +535,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Cannot find bugpack-registry.json file"); | ||
@@ -597,2 +615,3 @@ } | ||
if (this.requireStack.indexOf(key) !== -1) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Circular dependency in require calls. Requiring '" + key + "' which is already in the " + | ||
@@ -617,4 +636,6 @@ "require stack. " + JSON.stringify(this.requireStack)); | ||
if (bugPackSource.hasLoaded()) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Export found and it was loaded but nothing was exported. Ensure that '" + key + "' actually exports something by that name."); | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Export found but has not been loaded. Must first load '" + key + | ||
@@ -624,2 +645,3 @@ "' before requiring it."); | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Cannot find export '" + exportName + "' in package '" + packageName + "' and no " + | ||
@@ -626,0 +648,0 @@ "source has been registered for this export"); |
@@ -76,2 +76,3 @@ //------------------------------------------------------------------------------- | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Package '" + this.name + "' already has export '" + exportName + "'"); | ||
@@ -89,2 +90,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Could not find export '" + exportName + "' in package '" + this.name + "'"); | ||
@@ -148,2 +150,3 @@ } | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Trying to mark a bugpack export that is already marked. Are you exporting the same value more than once?"); | ||
@@ -150,0 +153,0 @@ } |
@@ -176,2 +176,3 @@ //------------------------------------------------------------------------------- | ||
if (this.hasEntryForExport(packageName, exportName)) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Package '" + packageName + "' already has a registry entry registered for export '" + | ||
@@ -196,2 +197,3 @@ exportName + "'"); | ||
if (this.hasEntryForSourceFilePath(sourceFilePath)) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("The source file path '" + sourceFilePath + "' has already been registered"); | ||
@@ -198,0 +200,0 @@ } |
@@ -119,2 +119,3 @@ //------------------------------------------------------------------------------- | ||
if (!registryEntryJson.path) { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Path is required for registry entries. " + JSON.stringify(registryEntryJson)); | ||
@@ -121,0 +122,0 @@ } |
@@ -57,2 +57,3 @@ //NOTE BRN: This file is no longer used. | ||
} else { | ||
Error.stackTraceLimit = Infinity; | ||
throw new Error("Path '" + this.moduleTopDir + "' is not a directory."); | ||
@@ -59,0 +60,0 @@ } |
{ | ||
"name": "bugpack", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Package loader to help make browser and node js package loading consistent", | ||
@@ -5,0 +5,0 @@ "main": "./lib/BugPackApi.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63809
1860