code: static ManagerCommunicationException mapSendActionException(String actionName, Exception exception)
      {
          if (exception instanceof IllegalStateException)
          {
              return new ManagerCommunicationException("Not connected to Asterisk Server", exception);
          }
          else if (exception instanceof EventTimeoutException)
          {
              return new ManagerCommunicationException("Timeout waiting for events from " + actionName + "Action", exception);
          }
          else
          {
              return new ManagerCommunicationException("Unable to send " + actionName + "Action", exception);
          }
      }
docs: Maps exceptions received from
  {@link org.asteriskjava.manager.ManagerConnection} when sending a
  {@link org.asteriskjava.manager.action.ManagerAction} to the corresponding
  {@link org.asteriskjava.live.ManagerCommunicationException}.
  
  @param actionName name of the action that has been tried to send
  @param exception exception received
  @return the corresponding ManagerCommunicationException