Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Failed module error #16299

Closed
wants to merge 2 commits into from
Closed

Conversation

aalmkhieber
Copy link

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:

Abdulrahman Almkheibar and others added 2 commits October 16, 2017 16:02
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
@Narretz
Copy link
Contributor

Narretz commented Oct 25, 2017

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
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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants