public void handle(Throwable throwable,Context context,Request request,Response response){
  if (throwable.getCause() instanceof OAuth2RestletException) {
    final OAuth2RestletException e=(OAuth2RestletException)throwable.getCause();
    handle(e,context,request,response);
  }
 else {
    final ServerException serverException=new ServerException(throwable);
    final OAuth2RestletException exception=new OAuth2RestletException(serverException.getStatusCode(),serverException.getError(),serverException.getMessage(),null);
    handle(exception,context,request,response);
  }
}

public void handle ( Throwable throwable , Context context , Request request , Response response ) { if ( throwable . getCause ( ) instanceof OAuth2RestletException ) { final OAuth2RestletException e = ( OAuth2RestletException ) throwable . getCause ( ) ; handle ( e , context , request , response ) ; } else { final ServerException serverException = new ServerException ( throwable ) ; final OAuth2RestletException exception = new OAuth2RestletException ( serverException . getStatusCode ( ) , serverException . getError ( ) , serverException . getMessage ( ) , null ) ; handle ( exception , context , request , response ) ; } }
handles any exception that is thrown when processing a oauth2 request .
