JSFiddle - React, Tailwind, and code Playground

by mgoetzke

HTML

<div ng-app="testApp" ng-controller="testController">
    use with http://github.com/occ/TraceKit
</div>

JavaScript

var mod = angular.module('testApp', []);

/*mod.factory('$exceptionHandler', function () {
    return function (exception, cause) {
        alert(exception.message);
    };
});*/

mod.config(function($provide) {
    $provide.decorator("$exceptionHandler", function($delegate) {
		return function(exception, cause) {
			$delegate(exception, cause);
            alert(exception.message);
		};
	});
});

mod.controller('testController', function($scope) {
    throw { message: 'error message' };
});