MCPcopy
hub / github.com/angular-ui/ui-grid / isError

Function isError

lib/test/angular/1.8.0/angular.js:772–780  ·  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

770 * @returns {boolean} True if `value` is an `Error`.
771 */
772function isError(value) {
773 var tag = toString.call(value);
774 switch (tag) {
775 case '[object Error]': return true;
776 case '[object Exception]': return true;
777 case '[object DOMException]': return true;
778 default: return value instanceof Error;
779 }
780}
781
782/**
783 * @ngdoc function

Callers 3

compileTemplateUrlFunction · 0.70
formatErrorFunction · 0.70
processChecksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected