1

I am trying to handle my Application errors by extending $exceptionHandler, with respect to that I registered a provider like below:

app.provider("$exceptionHandler", function() {
    return function(exception, cause) {
        // here I want to get the Controller which thrown the error
    }
});

Is there a way we can find it out?

Update:

In general I want to show a custom error message only for a section (particular scope in my html) which throws an exception. Is there a better way to handle this case generically

For e.g. "Data Unavailable" or "Unknown Error occurred"

Systematix Infotech
  • 2,345
  • 1
  • 14
  • 31
Siva
  • 19
  • 4
  • maybe this helps: http://stackoverflow.com/questions/591857/how-can-i-get-a-javascript-stack-trace-when-i-throw-an-exception – Alp May 15 '14 at 14:21

0 Answers0