Tabnine Logo
MessagingException.setNextException
Code IndexAdd Tabnine to your IDE (free)

How to use
setNextException
method
in
javax.mail.MessagingException

Best Java code snippets using javax.mail.MessagingException.setNextException (Showing top 20 results out of 315)

origin: camunda/camunda-bpm-platform

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
  }
  return required;
}
origin: com.sun.mail/javax.mail

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
    if (optional != required) {
      required.addSuppressed(optional);
    }
  }
  return required;
}
origin: camunda/camunda-bpm-platform

  chainedEx = sex;
else
  chainedEx.setNextException(sex);
  chainedEx = mex;
else
  chainedEx.setNextException(mex);
} finally {
transport.close();
origin: com.sun.mail/javax.mail

  chainedEx = sex;
else
  chainedEx.setNextException(sex);
  chainedEx = mex;
else
  chainedEx.setNextException(mex);
} finally {
transport.close();
origin: camunda/camunda-bpm-platform

  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
origin: com.sun.mail/javax.mail

  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
  mex = sfex;
else
  mex.setNextException(sfex);
break;
origin: com.centurylink.mdw/mdw-common

private void addMessagingException(MessagingException ex) {
  if (messagingException == null)
    messagingException = ex;
  else
    messagingException.setNextException(ex);
}
origin: javax.mail/com.springsource.javax.mail

private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
  }
  return required;
}
origin: google/mail-importer

public boolean setNextException(Exception ex) {
 return exception.setNextException(ex);
}
origin: com.sun.mail/android-mail

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
    if (optional != required) {
      required.addSuppressed(optional);
    }
  }
  return required;
}
origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec

public synchronized boolean setNextException(Exception cause) {
  if (next == null) {
    initCause(cause);
    next = cause;
    return true;
  } else if (next instanceof MessagingException) {
    return ((MessagingException) next).setNextException(cause);
  } else {
    return false;
  }
}
origin: jboss/jboss-javaee-specs

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
    if (optional != required) {
      required.addSuppressed(optional);
    }
  }
  return required;
}
origin: com.sun.mail/jakarta.mail

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
    if (optional != required) {
      required.addSuppressed(optional);
    }
  }
  return required;
}
origin: org.glassfish.metro/webservices-extra

/**
 * Try to attach a suppressed exception to a MessagingException in any order
 * that is possible.
 * @param required the exception expected to see as a reported failure.
 * @param optional the suppressed exception.
 * @return either the required or the optional exception.
 */
private static MessagingException attach(
    MessagingException required, Exception optional) {
  if (optional != null && !required.setNextException(optional)) {
    if (optional instanceof MessagingException) {
      final MessagingException head = (MessagingException) optional;
      if (head.setNextException(required)) {
        return head;
      }
    }
    if (optional != required) {
      required.addSuppressed(optional);
    }
  }
  return required;
}
origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec

public synchronized boolean setNextException(Exception cause) {
  if (next == null) {
    initCause(cause);
    next = cause;
    return true;
  } else if (next instanceof MessagingException) {
    return ((MessagingException) next).setNextException(cause);
  } else {
    return false;
  }
}
origin: org.apache.geronimo.javamail/geronimo-javamail_1.3.1_provider

  current = nextException;
} else {
  current.setNextException(nextException);
  current = nextException;
origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider

  current = nextException;
} else {
  current.setNextException(nextException);
  current = nextException;
origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec

chainedException.setNextException(e);
chainedException.setNextException(e);
origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec

chainedException.setNextException(e);
chainedException.setNextException(e);
origin: com.sun.mail/jakarta.mail

  chainedEx = sex;
else
  chainedEx.setNextException(sex);
  chainedEx = mex;
else
  chainedEx.setNextException(mex);
} finally {
transport.close();
javax.mailMessagingExceptionsetNextException

Javadoc

Add an exception to the end of the chain. If the end is not a MessagingException, this exception cannot be added to the end.

Popular methods of MessagingException

  • getMessage
  • <init>
    Constructs a MessagingException with the specified Exception and detail message. The specified excep
  • printStackTrace
  • getNextException
    Get the next exception chained to this one. If the next exception is a MessagingException, the chain
  • toString
    Override toString method to provide information on nested exceptions.
  • initCause
  • getCause
    Overrides the getCause method of Throwable to return the next exception in the chain of nested excep
  • superToString
    Return the "toString" information for this exception, without any information on nested exceptions.
  • getLocalizedMessage
  • addSuppressed
  • getStackTrace
  • setStackTrace
  • getStackTrace,
  • setStackTrace

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now