Codota Logo
MessagingException.setNextException
Code IndexAdd Codota 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)

  • Common ways to obtain MessagingException
private void myMethod () {
MessagingException m =
  • Codota IconException pex;Exception e;new MessagingException(pex.getMessage(), e)
  • Codota IconString s;new MessagingException(s)
  • Codota Iconnew MessagingException(addresses[i] + " is not an InternetAddress")
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Menu (java.awt)
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now