Hi Everybody,
I would like to "centralize" the exception handler. For example:

// login_view.dart: the login view throws an exception
throw new LoginException("Invalid username or password");


// exception_handler.dart: in some point of my application the exception is 
captured 
void exceptionHandler(Exception e) {
  if (e is LoginException) {
    showModalDialog(e.toString()).then(() => redirectToLoginView());
  }
}


Is that possible? I have read about the ExceptionHandler class, but I'm not 
sure if that class is suitable for this specific situation.
Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"angular-dart" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular-dart+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/angular-dart.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular-dart/6e5fd668-e270-4c02-9ace-c6d368586206%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to