Xeo*_*oss 12 javascript angularjs
Angular.js默认情况下不提供人类可读的错误消息.
反正有没有将默认的,神秘的Angular.js异常URL更改为更易读的错误消息?实际上,我必须复制URL,删除前缀,然后粘贴到浏览器中以查看问题所在.
例如,将以下异常转换为更有用的错误消息:
Error: [ng:areq] http://errors.angularjs.org/1.3.0/ng/areq?p0=InterfaceController&p1=not%20a%20function%2C%20got%20undefined y/<@https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular....
Run Code Online (Sandbox Code Playgroud)
对于这样的事情:
"Missing required argument to InterfaceController"
Run Code Online (Sandbox Code Playgroud)
我知道我可以提供自己的异常处理程序:
.factory('$exceptionHandler', function () {
return function errorCatcherHandler(exception, cause) {
console.error(exception);
};
});
Run Code Online (Sandbox Code Playgroud)
我接近这个错吗?
Xeo*_*oss 17
问题是我正在针对缩小/压缩版本进行开发(假设它与其他JS库一样).的未压缩版本包括一个可读的错误消息.
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js
https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2288 次 |
| 最近记录: |