MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / isError

Function isError

lib/test/angular/1.6.7/angular.js:786–794  ·  view source on GitHub ↗

* @description * Determines if a reference is an `Error`. * Loosely based on https://www.npmjs.com/package/iserror * * @param {*} value Reference to check. * @returns {boolean} True if `value` is an `Error`.

(value)

Source from the content-addressed store, hash-verified

784 * @returns {boolean} True if `value` is an `Error`.
785 */
786function isError(value) {
787 var tag = toString.call(value);
788 switch (tag) {
789 case '[object Error]': return true;
790 case '[object Exception]': return true;
791 case '[object DOMException]': return true;
792 default: return value instanceof Error;
793 }
794}
795
796/**
797 * @ngdoc function

Callers 3

compileTemplateUrlFunction · 0.70
formatErrorFunction · 0.70
processChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected