This repository was archived by the owner on Jul 13, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 185
More informative load errors #404
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4c614f0
Missing files produce a JS Error object within the project
nyarly 8ecaba4
More useful error messages from load problems
nyarly add4d10
Merge remote-tracking branch 'upstream/master' into more_informative_…
nyarly 519791a
Fixes to tests
nyarly 53102d3
Merge remote-tracking branch 'upstream/master' into more_informative_…
nyarly 7636854
Clearing up online request recording
nyarly 586399c
Removed (unneeded?) errno check from system-fetch
nyarly 6c7d335
Small fixes
nyarly 17ce329
Merge remote-tracking branch 'upstream/master' into more_informative_…
nyarly d3ba776
Post merge from upstream - resolve tests
nyarly c35ef14
Reverting test builds
nyarly File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ bower_components | |
tmp | ||
coverage | ||
.DS_Store | ||
*.sw? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -516,14 +516,35 @@ function logloads(loads) { | |
|
||
// 15.2.5.2.4 | ||
function linkSetFailed(linkSet, load, exc) { | ||
function requestsForLoad() { | ||
var reqs = []; | ||
linkSet.loads.forEach(function(aLoad){ | ||
aLoad.dependencies.forEach(function(dep){ | ||
if (dep.value == load.name) { | ||
reqs.push({as: dep.key, from: aLoad.name}); | ||
} | ||
}); | ||
}); | ||
return reqs; | ||
} | ||
|
||
var loader = linkSet.loader; | ||
var requests; | ||
|
||
if (load) { | ||
if (load && linkSet.loads[0].name != load.name) | ||
exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name); | ||
|
||
if (load) | ||
if (linkSet.loads[0].name != load.name) { | ||
requests = requestsForLoad(); | ||
|
||
if (requests[0]) { | ||
var req = requests[0]; | ||
exc = addToError(exc, 'Error loading ' + load.name + ' as "' + req.as + '" from ' + req.from); | ||
} else { | ||
exc = addToError(exc, 'Error loading ' + load.name + ' from ' + linkSet.loads[0].name); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should have braces if the first group has braces. |
||
} | ||
} | ||
else { | ||
exc = addToError(exc, 'Error loading ' + load.name); | ||
} | ||
} | ||
else { | ||
exc = addToError(exc, 'Error linking ' + linkSet.loads[0].name); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import './load-non-existent.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { nothing } from 'nosuchfile.js'; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space after
(aLoad)