This repository was archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Conversation
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
error is truncated In Angular.js the error in loading a module will lead to a failur in loading the dependent modules. In turn, this leads to a chain of errors in loading those modules. For some reason, angularjs is copying the error stack and passes it to the next error. This stack is encoded in URL error,so we end up sometimes with so long Error URL when we have may dependent modules. This option disables encoding the parameters in URL error: angular.errorHandlingConfig({isUrlParameter:false}); closes angular#14744
When some error occurs while loading a module, an error will raise containing the original error stack. Sometimes the final error contains a lot of stacks which make it difficult to read. closes angular#14744
Like I said in #16283 (comment), I don't think that adding more config options is very developer friendly. We should have a sane default that automatically restricts the length of the error message (in some way). Not many developers will dig into the config to find some config option that might affect the length of the error messages they are seeing. I also don't understand why you are not responding to the feedback I gave in the previous PR, and instead simply open a new PR. |
Narretz
pushed a commit
to Narretz/angular.js
that referenced
this pull request
Jun 6, 2018
Specific errors, such as nested module loading, can create very long error urls because they include the error stack. These urls create visual clutter in the browser console, are often not clickable, and may be rejected by the docs page because they are simply too long. We've already made improvements to the error display in angular#16283, which excludes the error url from error parameters, which results in cleaner error messages. Further, modern browsers restrict console message length intelligently. This option can still be useful for older browsers like Internet Explorer, or in general to reduce visual clutter in the console. Closes angular#14744 Closes angular#15707 Closes angular#16283 Closes angular#16299
3 tasks
Narretz
added a commit
that referenced
this pull request
Jun 6, 2018
Specific errors, such as those during nested module loading, can create very long error urls because the error message includes the error stack. These urls create visual clutter in the browser console, are often not clickable, and may be rejected by the docs page because they are simply too long. We've already made improvements to the error display in #16283, which excludes the error url from error parameters, which results in cleaner error messages. Further, modern browsers restrict console message length intelligently. This option can still be useful for older browsers like Internet Explorer, or in general to reduce visual clutter in the console. Closes #14744 Closes #15707 Closes #16283 Closes #16299 Closes #16591
Narretz
added a commit
that referenced
this pull request
Jun 6, 2018
Specific errors, such as those during nested module loading, can create very long error urls because the error message includes the error stack. These urls create visual clutter in the browser console, are often not clickable, and may be rejected by the docs page because they are simply too long. We've already made improvements to the error display in #16283, which excludes the error url from error parameters, which results in cleaner error messages. Further, modern browsers restrict console message length intelligently. This option can still be useful for older browsers like Internet Explorer, or in general to reduce visual clutter in the console. Closes #14744 Closes #15707 Closes #16283 Closes #16299 Closes #16591
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
At each failed module an error is raised and the stack of the old one is included as a message. Sometimes, the final error is too long. #14744 ,#16283 .
What is the new behavior (if this is a feature change)?
The developer has the option to disable either the stack or the whole error from being generated.
angular.errorHandlingConfig({isModuleError:/*Boolean*/,isModuleStack:/*Boolean*/})
Does this PR introduce a breaking change?
Please check if the PR fulfills these requirements
Other information: