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

Function isError

lib/test/angular/1.7.0/angular.js:754–762  ·  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

752 * @returns {boolean} True if `value` is an `Error`.
753 */
754function isError(value) {
755 var tag = toString.call(value);
756 switch (tag) {
757 case '[object Error]': return true;
758 case '[object Exception]': return true;
759 case '[object DOMException]': return true;
760 default: return value instanceof Error;
761 }
762}
763
764/**
765 * @ngdoc function

Callers 3

compileTemplateUrlFunction · 0.70
formatErrorFunction · 0.70
processChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected