code: public void sendWarning(Object source, Throwable e)
    {
      try {
        e.printStackTrace();
      
        String msg = e.toString();
      
        String s = getClass().getSimpleName() + ": " + e;
      
        // if warning is high-priority then send to high priority handlers first
        System.err.println(s);
        
        for (WarningHandler handler : _priorityHandlers) {
          try {
            handler.warning(source, msg);
          } catch (Throwable e1) {
            // WarningService must not throw exception
            log.log(Level.WARNING, e1.toString(), e1);
          }
        }
      
        // now send to the all handlers regardless of if its high priority
        for (WarningHandler handler : _handlers) {
          try {
            handler.warning(source, msg);
          } catch (Throwable e1) {
            // WarningService must not throw exception
            log.log(Level.WARNING, e1.toString(), e1);
          }
        }
  
        log.warning(s);
      } catch (Throwable e1) {
        // WarningService must not throw exception
        log.log(Level.WARNING, e1.toString(), e1);
      }
    }
docs: Send a warning message to any registered handlers. A high priority warning
  only goes to all handlers, high priority first. High priority handlers do
  not receive non-high priority warnings.
  
  @param source source of the message, usually you
  @param msg test to print or send as an alert
  @param isHighPriority set true to send to high priority warning handlers